Sendkeys

eiaitalia

Member
Licensed User
Need to create a keyboard wedge driver receiving a barcode string from the serial port and sending in keyboard emulation to the active window.

simply need to send keystrokes from my application (running in background) to the active window.

I tried the example below found in another tread and slightly modified to try it...

The problems is that return an error on the obj.createnew (if I remove such row the program run but obviously doesn't work).

Could you help ? or could you suggest any better way to send keys to active window.


Sub Globals
'Declare the global variables here.

End Sub

Sub App_Start
Form1.Show
obj.New1(False)
obj.CreateNew("System.Windows.Forms.SendKeys" & obj.System_Windows_Forms)
End Sub

Sub Button1_Click
obj.RunMethod2("Send","A","System.String") 'send A key.
End Sub
 

eiaitalia

Member
Licensed User
Thanks for your reply, but do you have any other suggestion to solve my problem ?

What can I try to send keystrokes from my hidden app to the active window ?
 
Top