• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 291
  • Last Modified:

Problems with SENDKEYS in Windos200 pro

I have a aplication deveveloped with vb6.0,
I use sendkeys in keypress event.
E.g.
Private Sub Text1_KeyPress(KeyAscii As Integer)
    If KeyAscii = 13 Then
        SendKeys "{TAB}"
        KeyAscii = 0
    End If
End Sub

but when I use the aplication in Windows2000 pro, my keyboard is lock it.

How Can i solve this problem?
0
jmgs082598
Asked:
jmgs082598
1 Solution
 
Dave_GreeneCommented:
I would put the code in the KeyUp method.
0
 
glass_cookieCommented:
Hi!

Have you tried using the keydown() event?

That's it!

glass cookie : )
0
 
Valliappan ANSenior Tech ConsultantCommented:
Give a try to:

   If KeyAscii = 13 Then
       KeyAscii = vbKeyTab
   End If

Cheers
0
 
PeteDCommented:
valli_an is right! Its bad to use sendkeys as it is very unreliable!
0

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now