Advertisement
Guest User

Untitled

a guest
Sep 18th, 2017
88
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.17 KB | None | 0 0
  1. Imports System.Net.Mail
  2. Public Class Login
  3.  
  4. Private Sub Form1_FormClosing(ByVal sender As Object, ByVal e As System.Windows.Forms.FormClosingEventArgs) Handles Me.FormClosing
  5. If CheckBox1.Checked = True Then
  6. If Not My.Settings.MyPassword = TextBox1.Text + TextBox2.Text Then
  7. My.Settings.MyUsername = TextBox1.Text
  8. My.Settings.MyPassword = TextBox2.Text
  9. My.Settings.Save()
  10. e.Cancel = False
  11. End
  12. End If
  13. End If
  14. End Sub
  15.  
  16. Private Sub Login_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
  17. TextBox1.Text = My.Settings.MyUsername
  18. TextBox2.Text = My.Settings.MyPassword
  19. End Sub
  20.  
  21. Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
  22. If TextBox1.Text = "" Then
  23. MsgBox("Username Is Missing")
  24. If TextBox2.Text = "" Then
  25. MsgBox("Password Is Mising")
  26. Else
  27. End If
  28. End If
  29. MsgBox("Login Succesfull", MsgBoxStyle.Information, "Yes ! ")
  30. End Sub
  31. End Class
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement