|
-
Jul 13th, 2001, 03:30 AM
#1
Thread Starter
Lively Member
sendkeys
I would like to use sendkeys to put data in my form.
How can i specify where sendkeys have to put its data?
Greetz
-
Jul 13th, 2001, 03:35 AM
#2
Addicted Member
the sendkeys will put "yours keys" onto the active txtbox
so u need to make sure where u want it to go is active!
this can be done by sending the TAB key untill the box u want has the focus
hope that helps
-
Jul 13th, 2001, 03:38 AM
#3
P.S. I'm sure there's a better way to fill the form you want, what kind is it?
-
Jul 13th, 2001, 03:46 AM
#4
Thread Starter
Lively Member
Now i tried this code
If i press a button of the keyboard it should put a 5 in de textbox.
Private Sub Form_Keydown(KeyCode As Integer, Shift As Integer)
txtkort(intevullen).SetFocus
SendKeys "5", False
end sub
but it's loop
-
Jul 13th, 2001, 03:48 AM
#5
Thread Starter
Lively Member
I just want to use a touch screen, keyboard and barcode scanner in my application.
And all the data can be entered in the 3 ways.
-
Jul 13th, 2001, 03:57 AM
#6
-= B u g S l a y e r =-
Originally posted by matje
Now i tried this code
If i press a button of the keyboard it should put a 5 in de textbox.
Private Sub Form_Keydown(KeyCode As Integer, Shift As Integer)
txtkort(intevullen).SetFocus
SendKeys "5", False
end sub
but it's loop
it loops... not a surprice, when you put the code in the KeyDown event, and in the keydown event you tell it to sendkey ... it will loop forever 
why on earth do you want to do this... I don't understand... please explain
-
Jul 13th, 2001, 04:18 AM
#7
Thread Starter
Lively Member
Well,
I would like to enter the data with a keyboard and also with a touchscreen so each command button of the form has to fill up the keyboard buffer just like you should press a key on the keyboard.
Do you understand?
An example
when i press 3 * (buttons on the form) on the touchscreen and i scan an article, it means that i want to sell 3 times the article.
so i don't have to scan 3 times the same.
-
Jul 13th, 2001, 05:08 AM
#8
Addicted Member
I fail to Understand aswell
here is too other methods:
Code:
Private Sub Form_Keydown(KeyCode As Integer, Shift As Integer)
txtKort(intevullen).text = 5
end sub
Private Sub Form_Keydown(KeyCode As Integer, Shift As Integer)
txtKort(intevullen).setfocus
keycode = 53
end sub
Some Days, i just get this feeling that i'm helping to write dozens of Viruses...
-
Jul 13th, 2001, 05:47 AM
#9
-= B u g S l a y e r =-
try this
Code:
Private Sub Form_Keydown(KeyCode As Integer, Shift As Integer)
Me.KeyPreview = False
DoEvents
Text1.SetFocus
SendKeys "5", False
DoEvents
Me.KeyPreview = True
End Sub
hope that works... it worked just fine on my pc
-
Jul 13th, 2001, 07:17 AM
#10
-= B u g S l a y e r =-
any luck with the sample matje ?
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|