Lid |
|
Hallo,
Ik ben bezig met een Loginform met VB.NET 2008. Ik heb een klein probleempje. Zodra ik inlog, opent hij het volgende Form1 en moet hij de Loginform automatish sluiten alleen doet hij dat niet. Ik snap niet hoe dit kan. Zou iemand me kunnen helpen?
Friend Class LoginForm1
Inherits System.Windows.Forms.Form
Private Sub OK_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles OK.Click
'this is the place to create a Username and/or a Password
'to change the Username change the text "My Username" or "My Other Username"
'to change the password change the text "Password" or "Other Password"
If UsernameTextBox.Text = "hitgigant" And PasswordTextBox.Text = "w8w00rd" Then
Form1.ShowDialog()
Me.Close()
Else : MsgBox("Verkeerde gebruikersnaam of wachtwoord")
End If
End Sub
Private Sub Cancel_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Cancel.Click
Me.Close()
End Sub
End Class
Friend Class LoginForm1 Inherits System.Windows.Forms.Form Private Sub OK_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles OK.Click 'this is the place to create a Username and/or a Password 'to change the Username change the text "My Username" or "My Other Username" 'to change the password change the text "Password" or "Other Password" If UsernameTextBox.Text = "hitgigant" And PasswordTextBox.Text = "w8w00rd" Then Form1.ShowDialog() Me.Close() Else : MsgBox("Verkeerde gebruikersnaam of wachtwoord") End If End Sub Private Sub Cancel_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Cancel.Click Me.Close() End Sub End Class
vinTage schreef: Ik heb de titel "foutje" veranderd, nu mag jij het ook nog een keer doen!
titjes schreef: Volgende keer ook leestekens en hoofdletters in je zinnen gebruiken graag!
|