ba272
asked on
Giving my program the focus, always
Hi,
I have written a keyboard logging program as part of my system to access the data being typed into a DOS system. The program runs on a Toshiba laptop and gets the keytrokes via its PS/2 port, and is coming in from a KVM switch, which splits the singal from the DOS keyboard and sends the same keystrokes to both the DOS machine and the laptop. But my worry is about the Window's focus.
In order for my system to work correctly, my key logger must always have the focus, which should not be a problem since the sole use for the laptop is to sniff the keyboard. But my fear is that some pop-up program, whether it's from my anti-virus program or Windows itself, will move the focus and thereby cause my system to lose the keyboard stream.
Is there a way to have Windows always giving my program the focus? I suppose I could have my program coninutally giving itself the focus. Is there a way for Windows to do this?
Thanks,
Bob
I have written a keyboard logging program as part of my system to access the data being typed into a DOS system. The program runs on a Toshiba laptop and gets the keytrokes via its PS/2 port, and is coming in from a KVM switch, which splits the singal from the DOS keyboard and sends the same keystrokes to both the DOS machine and the laptop. But my worry is about the Window's focus.
In order for my system to work correctly, my key logger must always have the focus, which should not be a problem since the sole use for the laptop is to sniff the keyboard. But my fear is that some pop-up program, whether it's from my anti-virus program or Windows itself, will move the focus and thereby cause my system to lose the keyboard stream.
Is there a way to have Windows always giving my program the focus? I suppose I could have my program coninutally giving itself the focus. Is there a way for Windows to do this?
Thanks,
Bob
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
I like the idea of simulating a mouse click - could come in handy elsewhere also.
Thanks,
Bob