Keypress olayı

ozlem16

New member
Private Sub Form_Load()
Text1.Text = ""
Text2.Text = ""
End Sub
Private Sub Text1_KeyPress(KeyAscii As Integer)
Char = Chr(KeyAscii)
KeyAscii = Asc(Char)
If KeyAscii = 13 Then
If Text1.Text = "özlem esra" Then
MsgBox ("şifreyi giriniz")
Else
MsgBox ("yanlış/ad soyad")
Form1.Show
Form2.Hide
End If
End If
End Sub

Private Sub Text2_KeyPress(KeyAscii As Integer)
Char = Chr(KeyAscii)
KeyAscii = Asc(Char)
If KeyAscii = 13 Then
If Text2.Text = "1234" Then
Form1.Hide
Form2.Show
Else
MsgBox "yanliş şifre"
End If
End If
End Sub
 

HTML

Üst