H
Himselff
Hi guys,
Im new to dot net and wondering how i could remake the same way i was in
vb6, capture all keypress whitin a form,
per exemple i was on the form looking for some keypress
privete sub form_keypressed(keyascii as integer)
if keyascii = 13 then 'for the enter key
call button_click
end if
end sub
what i got so far in vb .net is :
Private Sub FrmMain_KeyPress(ByVal sender As Object, ByVal e As
System.Windows.Forms.KeyPressEventArgs) Handles MyBase.KeyPress
If e.KeyChar = "P" Or e.KeyChar = "p" Then
e.Handled = True
Call BtmProduit_Click(sender, e)
End If
end sub
which is not working and dosent fire any event at all, so after looking the
forum and internet, ive found nothing that was working,
Thanks a lot in advance !
Him
Im new to dot net and wondering how i could remake the same way i was in
vb6, capture all keypress whitin a form,
per exemple i was on the form looking for some keypress
privete sub form_keypressed(keyascii as integer)
if keyascii = 13 then 'for the enter key
call button_click
end if
end sub
what i got so far in vb .net is :
Private Sub FrmMain_KeyPress(ByVal sender As Object, ByVal e As
System.Windows.Forms.KeyPressEventArgs) Handles MyBase.KeyPress
If e.KeyChar = "P" Or e.KeyChar = "p" Then
e.Handled = True
Call BtmProduit_Click(sender, e)
End If
end sub
which is not working and dosent fire any event at all, so after looking the
forum and internet, ive found nothing that was working,
Thanks a lot in advance !
Him