-
I have code like so:
Dim hWnd As Long
hWnd = FindWindow("A Program", CLng(0))
BringWindowToTop hWnd
SendKeys ("c")
And I thought that it should set "A Program" as the highlighted or active window and sendkeys would send the keys "to" the program but instead it still sends them to the previously selected program, Any help to get it to send it to "A Program"
Andy
-
I don't have VB on this computer, so I can't say for sure this works, but try using:
Code:
Dim MyAppID as Long
MyAppID = Shell("A Program", 1) ' Run the program (use full path plus program name in quotes)
AppActivate MyAppID ' Activate the program
SendKeys ("c") ' Send "c" to that program
Good luck,
~seaweed
[This message has been edited by seaweed (edited 02-21-2000).]