Solved

Problems with SENDKEYS in Windos200 pro

Posted on 2001-08-09
4
253 Views
Last Modified: 2008-02-26
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
Comment
Question by:jmgs082598
4 Comments
 
LVL 8

Expert Comment

by:Dave_Greene
ID: 6370890
I would put the code in the KeyUp method.
0
 
LVL 8

Expert Comment

by:glass_cookie
ID: 6370920
Hi!

Have you tried using the keydown() event?

That's it!

glass cookie : )
0
 
LVL 9

Accepted Solution

by:
Valliappan AN earned 100 total points
ID: 6371839
Give a try to:

   If KeyAscii = 13 Then
       KeyAscii = vbKeyTab
   End If

Cheers
0
 
LVL 2

Expert Comment

by:PeteD
ID: 6373588
valli_an is right! Its bad to use sendkeys as it is very unreliable!
0

Featured Post

DevOps Toolchain Recommendations

Read this Gartner Research Note and discover how your IT organization can automate and optimize DevOps processes using a toolchain architecture.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

I’ve seen a number of people looking for examples of how to access web services from VB6.  I’ve been using a test harness I built in VB6 (using many resources I found online) that I use for small projects to work out how to communicate with web serv…
Introduction In a recent article (http://www.experts-exchange.com/A_7811-A-Better-Concatenate-Function.html) for the Excel community, I showed an improved version of the Excel Concatenate() function.  While writing that article I realized that no o…
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…

810 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question