Asked by duncanb7
at 2024-10-18 03:09:16
Point:500 Replies:2 POST_ID:828382USER_ID:11059
Topic:
Visual Basic Programming;;
I would like to ask serveral question
Question-1 how to do postmessage with simulation key stroke of Alt-s combined keys, and I tried the follows
it should work but it fail ?
PostMessage hdlg, WM_SYSKEYDOWN, &H73&, 0 'Alt-S Down
'PostMessage hdlg, WM_SYSTEMUP, &H73&, 0 'Alt-S Up
'Ascii of S in HEX shoule be 73.
Question-2, I read those post, sometimes, people are using sendmessage, sometime using postmessage
what is the major different, I tried sendmessage for sending alt-s but it not repsone .
Question-3, Should we do coding to a must for including WM_SYSKEYUP/WM_LBUTTONUP when doing WM_SYSKEYDOWN/WM_LBUTTONDOWN for simulating key-stroke and mouse-click that is similar our hand operation, press
key down and key up/( OR mouseclick down/up). I found sometimes the opertioan is also working even wihout
'PostMessage hdlg, WM_SYSTEMUP VBA statement , Why ?
Question-4, what is different we are between using sendmessage and sendlgitemmessage ?
Question-5, WHen we including API lib like Private Declare Function PostMessage Lib "user32" Alias "PostMessageA"
why using Alias ,?I know A is for ascill and W is for unicode, how to input the uncode for postmessage when using
Private Declare Function PostMessageW Lib "user32"
Please advise
Duncan
Question-1 how to do postmessage with simulation key stroke of Alt-s combined keys, and I tried the follows
it should work but it fail ?
PostMessage hdlg, WM_SYSKEYDOWN, &H73&, 0 'Alt-S Down
'PostMessage hdlg, WM_SYSTEMUP, &H73&, 0 'Alt-S Up
'Ascii of S in HEX shoule be 73.
Question-2, I read those post, sometimes, people are using sendmessage, sometime using postmessage
what is the major different, I tried sendmessage for sending alt-s but it not repsone .
Question-3, Should we do coding to a must for including WM_SYSKEYUP/WM_LBUTTONUP when doing WM_SYSKEYDOWN/WM_LBUTTONDOWN for simulating key-stroke and mouse-click that is similar our hand operation, press
key down and key up/( OR mouseclick down/up). I found sometimes the opertioan is also working even wihout
'PostMessage hdlg, WM_SYSTEMUP VBA statement , Why ?
Question-4, what is different we are between using sendmessage and sendlgitemmessage ?
Question-5, WHen we including API lib like Private Declare Function PostMessage Lib "user32" Alias "PostMessageA"
why using Alias ,?I know A is for ascill and W is for unicode, how to input the uncode for postmessage when using
Private Declare Function PostMessageW Lib "user32"
Please advise
Duncan