Advertisement
Guest User

Untitled

a guest
Mar 17th, 2017
701
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. _________________________________
  2. Source Code: Splash Screen
  3. _________________________________
  4.  
  5. Private Sub Form_Load()
  6. Timer1.Enabled = True
  7. Me.Left = (Screen.Width - Me.Width) / 2
  8. Me.Top = (Screen.Height - Me.Height) / 2
  9. End Sub
  10. Private Sub Timer1_Timer()
  11. ProgressBar1.Value = ProgressBar1.Value + 5
  12. lblstatus.Caption = "Loading..Plz Wait.."
  13. lblstat.Caption = ProgressBar1.Value & "%"
  14. If ProgressBar1.Value = ProgressBar1.Max Then
  15. Timer1.Enabled = False
  16. Unload Me
  17. welcome.Show
  18. End If
  19. End Sub
  20. _________________________________
  21. Source Code: Welcome Screen
  22. __________________________________________
  23.  
  24. Private Sub Form_Load()
  25. Me.Left = (Screen.Width - Me.Width) / 2
  26. Me.Top = (Screen.Height - Me.Height) / 2
  27. End Sub
  28. Private Sub logbtn_Click()
  29. login.Show
  30. welcome.Hide
  31. register.Hide
  32. End Sub
  33. Private Sub regbtn_Click()
  34. register.Show
  35. login.Hide
  36. welcome.Hide
  37. End Sub
  38.  
  39. _________________________________
  40. Source Code: Registration form
  41. ________________________________________________
  42.  
  43.  
  44. Private Sub Form_Load()
  45. registerado.Recordset.AddNew
  46. End Sub
  47. Private Sub regbtn_Click()
  48. registerado.Recordset.Fields("Rollno") = txtroll.Text
  49. registerado.Recordset.Fields("Name") = txtname.Text
  50. registerado.Recordset.Fields("Class") = txtclass.Text
  51. registerado.Recordset.Fields("Username") = txtuser.Text
  52. registerado.Recordset.Fields("Password") = txtpass.Text
  53. registerado.Recordset.Fields("Address") = txtadd.Text
  54. registerado.Recordset.Fields("Contact") = txtphone.Text
  55. registerado.Recordset.Update
  56. MsgBox "User Registration Successful,Please Login with Username and Password", vbInformation
  57. login.Show
  58. register.Hide
  59. End Sub
  60.  
  61. _________________________________
  62. Login Form
  63. _________________________________
  64. Private Sub loginbtn_Click()
  65. loginado.RecordSource = "Select * from Log where Username ='" + txtuser.Text + "' and password='" + txtpass.Text + "' "
  66. loginado.Refresh
  67. If loginado.Recordset.EOF Then
  68. MsgBox "Login Failed.. Please login with correct credentials", vbCritical
  69. login.Show
  70. txtuser.Text = ""
  71. txtpass.Text = ""
  72. Else
  73. MsgBox "Well Done..Login Successful", vbInformation
  74. App.Show
  75. login.Hide
  76. End If
  77. End Sub
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement