Home > Software engineering >  Help: how to use VB program click another button on the toolbar?
Help: how to use VB program click another button on the toolbar?

Time:09-28

How to use VB program click another button on the toolbar?
The toolbar has to handle, handle to the button above, how also can not take try to take to handle to send the mouse click, only the first button response, the procedure is as follows, can you tell me the master should change?

HWND3=FindWindowEx (HWND2, 0, "TToolBar vbNullString)

If HWND3 & gt; 0 Then
SendMessage HWND3 BM_CLICK, 0, 0
PostMessage HWND3 WM_LBUTTONDOWN, 0, 0 'the button by pressing the left mouse button
PostMessage HWND3 WM_LBUTTONUP, 0, 0
End If

CodePudding user response:

http://www.autohotkey.com

CodePudding user response:

reference 1st floor zhao4zhong1 response:
http://www.autohotkey.com

This range is too big? You mean I need to start from zero?

CodePudding user response:

Use. Ahk script to complete the features you need,

CodePudding user response:

reference 4 floor zhao4zhong1 response:
use. Ahk script complete function, you need

Don't know this script is completely ah, don't know how or why is out and VB combined into one piece

CodePudding user response:

Spy monitor the toolbar's parent window message first, and then point you'd like to have some button several times, see spy to news is what, I remember that sounds like the WM_COMMAND, note the wparam, lparam parameter is what, analysis the ID, and then as a normal button point send the toolbar parent window click on the message,,,,,,,,

CodePudding user response:

reference 5 floor iritwq reply:
Quote: refer to 4th floor zhao4zhong1 response:

Use. Ahk script to complete function, you need

Don't know this script is completely ah, don't know how or why is out and VB combined into a

Using the macro recording tool to record a AutoHotKey. Ahk script, slightly modified, Shell in VB "myaction. Ahk", vbHide calls. Ahk script can,
  • Related