|
-
Aug 2nd, 2008, 11:26 AM
#1
Thread Starter
Hyperactive Member
[RESOLVED] Using SendMessage to send "enter" to an app
I want to have a VB6 program open an app, then send a keystroke (enter) to the app. The app may or may not be in focus. I thought if I use SendMessage as shown below, this would work whether or not the app window is in focus...
SendMessage (Hwnd,WM_CHAR,13,ByVal 0)
I have two problems... first, I don't know what declarations need to be made for SendMessage. Last of all, I don't know how to get the Hwnd when I launch the app. I thought maybe it would be like this...
Hwnd = Shell("c:\Programs\MyApp.exe", vbNormalFocus)
I know this isn't correct, but I don't know how to do it. Any help would be appreciated!
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|