Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to tell Windows to send text to current window?

Status
Not open for further replies.

loganmex

Programmer
Nov 14, 2001
17
0
0
MX
I have a barcode reader connected to COM1 port.
When you read a code, the numbers are read in the port.
My user needs these numbers not from a port, but as if they were "typed" from the keyboard.
I wonder if there's a way to acomplish that.
I was thinking on a way to tell windows to send all the info that comes from the port to the current window (it could be Word, Excel, Notepad, or another app).
Or maybe another aproach.

Suggestions are welcome. Thanks
 
Well, it sounds easy though I've never tried it.

Write a small VB program, you could even get fancy and have it minimize to the tray but that isn't necessary.

Use the MSCOMM control to read from COM1 and use the SendKeys statement to send the stuff to the current foreground window.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top