Home > Software engineering >  VB background PostMessage and SendMessage old shrimp emergency
VB background PostMessage and SendMessage old shrimp emergency

Time:10-25

The existing code
PostMessage HWND, WM_SYSKEYDOWN, 65, 0
Has successfully realized the send operation of Alt + a
But due to special reasons, need: first press the Alt key, then multiple letters/Numbers, the pop-up Alt,
Process:
Alt press
Delay 50
A press
Delay 50
A pop-up
Delay 50
1 press
Delay 50
1 pop-up
Delay 50
Alt bounce

Background operation Alt, PostMessage/SendMessage
Reference for http://www.cnblogs.com/hahaqi/archive/2010/08/10/1796444.html

I put the parameter changed a lot and try not to come out old and shrimp

CodePudding user response:

http://download.csdn.net/detail/veron_04/1745426

CodePudding user response:

reference 1st floor response:
http://download.csdn.net/detail/veron_04/1745426


The external form, cannot be used,

CodePudding user response:

http://download.csdn.net/detail/veron_04/2813308

CodePudding user response:

The
reference 3 floor response:
http://download.csdn.net/detail/veron_04/2813308



T_T last 70 points on this post, download, the last point, and hope to help to download the,,,

CodePudding user response:

 
Option Explicit
Private Declare Function PostMessage Lib "user32" Alias "PostMessageA" (ByVal HWND As Long, ByVal wMsg As Long, ByVal wParam As Long, ByVal lParam) As Long As Long
Private Declare Sub Sleep Lib "kernel32" (ByVal dwMilliseconds As Long)
Private Declare Function FindWindow Lib "user32" Alias "FindWindowA" (ByVal lpClassName As String, ByVal lpWindowName As String) As Long
Private Const WM_SYSKEYUP=& amp; H105
Private Const WM_SYSKEYDOWN=& amp; H104
Private Sub test ()
Dim lngHwnd As Long
LngHwnd=FindWindow (vbNullString, "1. TXT - notepad")
PostMessage lngHwnd WM_SYSKEYDOWN, & amp; H46, & amp; H3E0001 Or & amp; H20000000 'simulation by pressing Alt + F
Sleep 100
PostMessage lngHwnd WM_SYSKEYUP, & amp; H46, & amp; HC03E0001 Or & amp; H20000000 'simulation raised Alt + F
End Sub

Private Sub Command1_Click ()

End Sub

Private Sub Form_Load ()
Timer1. Enabled=True
Timer1. Interval=1000
End Sub
Private Sub Timer1_Timer ()
Call the test
End Sub

CodePudding user response:

This definitely useful, simulate the Alt + F press and bounce

CodePudding user response:

Elder brother, in fact,
PostMessage window handle, WM_SYSKEYDOWN, & amp; H46, & amp; H3E0001 Or & amp; H20000000
This line will implement operation
The following sleep didn't play a role interval,,,

CodePudding user response:

The
reference 7 floor response:
,
actuallyPostMessage window handle, WM_SYSKEYDOWN, & amp; amp; H46, & amp; amp; H3E0001 Or & amp; amp; H20000000
This line will implement operation
The following sleep didn't play a role interval,,,

Yes indeed, hope to be able to help you,

CodePudding user response:

Elder brother really have pop-up operation? ! ? ! ? ! ? ! ? ! ? !

CodePudding user response:

refer to the eighth floor response:
refer to 7th floor response:
Elder brother, in fact,
PostMessage window handle, WM_SYSKEYDOWN, & amp; amp; amp; H46, & amp; amp; amp; H3E0001 Or & amp; amp; amp; H20000000
This line will implement operation
The following sleep didn't play a role interval,,,

Yes indeed, hope to be able to help you,



Oh, if you have pop-up operation can best ah weak weak ask next
& H3E0001 Or & amp; H20000000
This is what meaning,,,

CodePudding user response:

Specific I don't know, anyway is to specify special function keys, you can baidu once his meaning,

CodePudding user response:

http://topic.csdn.net/u/20101101/14/c6c17f1a-1fd8-4cec-afcf-045265e5f819.html

CodePudding user response:

The
reference 11 floor response:
specific I don't know, anyway, is to specify special function keys, you can baidu once his meaning,


The last parameter what I use is 0 can run
Baidu turned post has said very vague no specific meaning

CodePudding user response:

http://download.csdn.net/detail/veron_04/1745426
  • Related