掲示板システム
ホーム
アクセス解析
カテゴリ
ログアウト
ツールバーボタンのValueプロパティを操作するには? (ID:77412)
名前
ホームページ(ブログ、Twitterなど)のURL (省略可)
本文
Private Declare Function ClientToScreen Lib "user32" (ByVal hwnd As Long, lpPoint As POINTAPI) As Long を追加して、 Private Sub Command1_Click() Dim wPos As POINTAPI, cPos As POINTAPI ShowCursor 0 GetCursorPos cPos wPos.x = Toolbar1.Buttons(2).Left \ 15 + Toolbar1.Buttons(2).Width \ 15 \ 2 wPos.y = Toolbar1.Buttons(2).Top \ 15 + Toolbar1.Buttons(2).Height \ 15 \ 2 ClientToScreen Form1.hwnd, wPos SetCursorPos wPos.x, wPos.y mouse_event 2, 0, 0, 0, 0 mouse_event 4, 0, 0, 0, 0 SetCursorPos cPos.x, cPos.y ShowCursor 1 End Sub のようにしたほうがうまくいきます。
←解決時は質問者本人がここをチェックしてください。
戻る
掲示板システム
Copyright 2020 Takeshi Okamoto All Rights Reserved.