掲示板システム
ホーム
アクセス解析
カテゴリ
ログアウト
マウスカーソルの画像を取得して描画するには? (ID:87722)
名前
ホームページ(ブログ、Twitterなど)のURL (省略可)
本文
下記を試して見て下さい。 Option Explicit Private Declare Function GetCursor Lib "user32" () As Long Private Declare Function DrawIcon Lib "user32" _ (ByVal hdc As Long, ByVal x As Long, ByVal y As Long, _ ByVal hIcon As Long) As Long Private Sub Command1_Click() On Error Resume Next Dim MoPoint As Integer Dim i As Integer '現在のマウスポインターを取得 MoPoint = Screen.MousePointer Picture1.AutoRedraw = True For i = 0 To 15 Screen.MousePointer = i DoEvents If i < 8 Then DrawIcon Picture1.hdc, i * 40, 0, GetCursor() Else DrawIcon Picture1.hdc, (i - 8) * 40, 50, GetCursor() End If Next i Picture1.Refresh 'マウスポインターを元に戻す Screen.MousePointer = MoPoint End Sub
←解決時は質問者本人がここをチェックしてください。
戻る
掲示板システム
Copyright 2020 Takeshi Okamoto All Rights Reserved.