I have written a VB6 program a while ago and it was working perfectly for years.Today I did a windows update and the program stopped working.What actually happens is that I have a routine which starts another program (Through SHELL) sets the focus on it and with SendKeys I emulated keystroke F2 which actually starts the called program.Easy enough.Obviously the update had some security stuff in it (I have no ideea which update as it took 107 updates from MS today) which kills the sendkeys.Is there any other easy way except api's to simulate a keystroke (my case "F2" key) ?
Here's the routine in question:
As I said this worked perfectly untill a few hours ago.any help would be highly appreciated.
Private Sub Response_B1()
Dim pHandle As Long
Dim ITask As Long
Form1.TxtSayit.Text = "Now Starting 3G internet connection "
ITask = Shell("C:\Program Files\3 Mobile\3 Mobile Broadband\3 Mobile Broadband.exe", vbNormalFocus)
pHandle = OpenProcess(SYNCHRONIZE, 0, ITask)
If (pHandle <> 0) Then
WaitForSingleObject pHandle, 30000
Form1.TxtSayit.Text = "3g connection has been started to retrieve the IP address press 8 "
'Form1.Text6.Text = LocalIPAddresses("+")