Crypt
Aug 28th, 2000, 04:29 PM
Hiyas,
I am having a bit of trouble with the sendkeys api, I can't work out how to send ctrl + a couple of letters to a window with the sendmessage api.
Public Declare Function SendMessage Lib "user32" Alias "SendMessageA" (ByVal hwnd As Long, ByVal wMsg As Long, ByVal wParam As Long, lParam As Any) As Long
I presume you VK_Control constant to simulate the click of the control button on that window,
Public Const VK_CONTROL = &H11
and use that for wParam variable, but I don't know what you would set the wMsg variable part of it to?, and where you put the keys you want to send with the control to say send ctrl+v or something?.
so I thought maybe you used the SendMessageByString api,
Declare Function SendMessageByString Lib "user32" Alias "SendMessageA" (ByVal hwnd As Long, ByVal wMsg As Long, ByVal wParam As Long, ByVal lParam As String) As Long
and add the keys you want to send along with the ctrl to the lParam, and again use the wParam for the ctrl constant, but I don't know what you use for the variable wMsg again.
my other question is about closing folders with the sendmessage api, I know how to close apps, with it, using the wm_close constant, and wm_destroy, but for folders this doesn't work, and destroy just stuffs up the folder so you can't even press the close button to close the folder, is there a way to do this?.
and the last question, has got nothing to do with the sendmessage api or api for that matter, I just didn't think it was worth opening a new topic about, I was just wonder what the maxium items for a listbox was?.
thanx for any help with this.
I am having a bit of trouble with the sendkeys api, I can't work out how to send ctrl + a couple of letters to a window with the sendmessage api.
Public Declare Function SendMessage Lib "user32" Alias "SendMessageA" (ByVal hwnd As Long, ByVal wMsg As Long, ByVal wParam As Long, lParam As Any) As Long
I presume you VK_Control constant to simulate the click of the control button on that window,
Public Const VK_CONTROL = &H11
and use that for wParam variable, but I don't know what you would set the wMsg variable part of it to?, and where you put the keys you want to send with the control to say send ctrl+v or something?.
so I thought maybe you used the SendMessageByString api,
Declare Function SendMessageByString Lib "user32" Alias "SendMessageA" (ByVal hwnd As Long, ByVal wMsg As Long, ByVal wParam As Long, ByVal lParam As String) As Long
and add the keys you want to send along with the ctrl to the lParam, and again use the wParam for the ctrl constant, but I don't know what you use for the variable wMsg again.
my other question is about closing folders with the sendmessage api, I know how to close apps, with it, using the wm_close constant, and wm_destroy, but for folders this doesn't work, and destroy just stuffs up the folder so you can't even press the close button to close the folder, is there a way to do this?.
and the last question, has got nothing to do with the sendmessage api or api for that matter, I just didn't think it was worth opening a new topic about, I was just wonder what the maxium items for a listbox was?.
thanx for any help with this.