Im not sure what you mean when you say you want to default to a specific
button on the enter keypress. If you mean that when a non specific control
is focused and I press the Enter key, can I invoke a Handler, well you could
do this ?
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles Button1.Click
Debug.WriteLine("Button1 Pressed")
End Sub
Private Sub Form1_KeyPress(ByVal sender As Object, ByVal e As
System.Windows.Forms.KeyPressEventArgs) Handles MyBase.KeyPress
Button1_Click(Me, EventArgs.Empty)
End Sub
--
OHM ( Terry Burns ) * Use the following to email me *
Dim ch() As Char = "ufssz/cvsotAhsfbuTpmvujpotXjui/OFU".ToCharArray()
For i As Int32 = 0 To ch.Length - 1
ch(i) = Convert.ToChar(Convert.ToInt16(ch(i)) - 1)
Next
Process.Start("mailto:" & New String(ch))
--
"alien2_51" <an*******@discussions.microsoft.com> wrote in message
news:2b****************************@phx.gbl...
I have a form with several buttons, I'd like to default to
a specific button on the Enter keypress event, How would I
do this...?