Newbie Question About Sending Keys

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi,

I have a program that talks to a CDMA modem in VB 6. Now I can send and
receive data from it just fine.

However if I want to configure it, I need to use a terminal program such as
hyperterminal, because I need to send CTRL + w in order to enter the modem's
configuration menu.

Is there any way of transmitting CTRL + w using VB? I did look in the ASCII
chart, but found no representation for the CTRL key.

I know how to send the CTRL key to a window using SendKeys in VB. But I can
not figure how to transmit it.

My application uses Winsock control using UDP protocol.

Thanks in advance.

Pete.
 
Peter said:
Hi,

I have a program that talks to a CDMA modem in VB 6. Now I can send and
receive data from it just fine.

However if I want to configure it, I need to use a terminal program such as
hyperterminal, because I need to send CTRL + w in order to enter the modem's
configuration menu.

Is there any way of transmitting CTRL + w using VB? I did look in the ASCII
chart, but found no representation for the CTRL key.

I am guessing that when you do a Ctrl+W in hyperterminal, what is
actually sent to the modem is ASCII 23. The ASCII control characters
(0-31) are usually transmitted using ctrl-@ for 0, ctrl-A for 1, ...
ctrl-G for 7 (BEEP) and so on.
I know how to send the CTRL key to a window using SendKeys in VB. But I can
not figure how to transmit it.

Try sending a chr$(23) and see if that puts your modem into
configuration mode.
 
Peter Krikelis said:
Hi,

I have a program that talks to a CDMA modem in VB 6. Now I can send and
receive data from it just fine.

However if I want to configure it, I need to use a terminal program such
as
hyperterminal, because I need to send CTRL + w in order to enter the
modem's
configuration menu.

Is there any way of transmitting CTRL + w using VB? I did look in the
ASCII
chart, but found no representation for the CTRL key.

I know how to send the CTRL key to a window using SendKeys in VB. But I
can
not figure how to transmit it.

My application uses Winsock control using UDP protocol.

Thanks in advance.

Pete.

If I recall correctly, VB 6 has an equivalent to the Visual Basic .NET
SendKeys class, which is designed for the purpose of sending keystrokes to a
running application.
I'm sorry I don't have VB 6 installed to give you a specific help reference,
but try doing a help search on "SendKeys" or "SendKey" and a helpful article
should turn up.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top