G
Guest
Hi there,
I need to develop a program that captures input from a serial port and/or
network and fools a native DOS application into thinking it comes from the
keyboard.
I've tried using Windows.Forms.Sendkeys.Send(), but I encountered an
exception every time the method was called (something about the application
not listening for Windows messages).
I changed the code to use Windows.Forms.Sendkeys.SendWait(), and that works
fine for windows apps (tested in Notepad, Word, ...) and works even for the
command prompt (cmd.exe) in winXP. But DOS applications don't seem to get the
right keystrokes.
When I tried to use it on EDIT.EXE, nothing showed up. When I tried it on
the appliccation I'm actually willing to use it on, I got unexplained
results: the program returns to the main screen when the sendkeys is
performed, showing that it does receive a message of some kind (otherwise, it
wouldn't return to the main menu screen), but not the right data (which is a
command string, followed by {ENTER}), because then the program should execute
the command.
I've been searching the Knowledge Base and the Internet, but found only
relevant info for VB3 and VB4, being pre-in the WindowsXP days.
The program should be capable to perform it's 'duty' in a variety of locales
and with a variety of keyboard layouts, and it should work on upcomming
Windows releases, as wel as previous versions (from Win95 on).
Anybody got a solution to my problem??
I need to develop a program that captures input from a serial port and/or
network and fools a native DOS application into thinking it comes from the
keyboard.
I've tried using Windows.Forms.Sendkeys.Send(), but I encountered an
exception every time the method was called (something about the application
not listening for Windows messages).
I changed the code to use Windows.Forms.Sendkeys.SendWait(), and that works
fine for windows apps (tested in Notepad, Word, ...) and works even for the
command prompt (cmd.exe) in winXP. But DOS applications don't seem to get the
right keystrokes.
When I tried to use it on EDIT.EXE, nothing showed up. When I tried it on
the appliccation I'm actually willing to use it on, I got unexplained
results: the program returns to the main screen when the sendkeys is
performed, showing that it does receive a message of some kind (otherwise, it
wouldn't return to the main menu screen), but not the right data (which is a
command string, followed by {ENTER}), because then the program should execute
the command.
I've been searching the Knowledge Base and the Internet, but found only
relevant info for VB3 and VB4, being pre-in the WindowsXP days.
The program should be capable to perform it's 'duty' in a variety of locales
and with a variety of keyboard layouts, and it should work on upcomming
Windows releases, as wel as previous versions (from Win95 on).
Anybody got a solution to my problem??