something like:
sub text1_keypress(keyascii as integer)
if keyascii=48 then
command0.press
end if
end sub
Printable View
something like:
sub text1_keypress(keyascii as integer)
if keyascii=48 then
command0.press
end if
end sub
command1_click
Just call the procedure that handles the click event
tnx, but i know it
i need that le button is pressed while i'm writing on the keyboard, like the windows calculator does.
i'm sorry 'bout my english :D
Hey!!!
Use the Sendkeys method!!
pari
can you make yourself more clear.
windows calculator just does as suggested by supster. only difference is you cant make out the time difference bet click and display of character
Why dont you just disable it once and enable it again..simple man
I have a very crude solution.Quote:
Originally posted by biifu
something like:
sub text1_keypress(keyascii as integer)
if keyascii=48 then
command0.press
end if
end sub
On a form, place a Checkbox, with its Style property set to 1-Graphical. Set the KeyPreview property of the form to True, and then paste the following code in the form's code window:
VB Code:
Private Sub Form_KeyPress(KeyAscii As Integer) Dim I As Long, J As Long If KeyAscii = Asc("1") Then Check1.Value = 1 Me.Refresh For I = 0 To 1000 For J = 0 To 1000 Next Next Check1.Value = 0 Me.Refresh End If End Sub
Run the project and when the form with the checkbox appears, press 1 to see the effect.
.