How to create simple login table through visual basic 6

HOW TO CREATE TABLE LOGIN

To keep the data on the Application is not just anyone can see and change it is usually made Form Login, with the Login Form data stored in the application can only be viewed and edited by users who have registered. In Standard Applications usually use dynamic Login Form so we can add user and change password, which is usually user data and password stored in database file. Before creating a Dynamic Login Form, we should first learn about how to create a simple Login Form that is static, meaning the user and password is specified in the vb 6 coding so it can not be changed. By learning the basic form of Static Login Form then will facilitate us when creating Dynamic Login Form. To Create a Simple Login Form, follow these steps:
  1.  Make two Form, Form name leave Defaut (Form1 and Form2)
  2.  In Form1 add component:
  •  TextBox (clear text, in PasswordChar TextBox2 fill in asterisk (*)
  •  Label (Caption: FORM LOGIN, User Name, Password)
  •  Command Button (Login and Exit)

3.In Form2 Add 1 Label, change its caption to "CORE FORM MAIN MENU"





4.Next just enter the script into Form1, Right click on Form1 and select View Code to open the code window. Then enter the following code script:


rivate Sub Command1_Click()
If Text1 = "admin" And Text2 = "admin" Then
Form2.Show 'Perintah Menampilkan Form 2
Form1.Visible = False 'Menyembunyikan Form 1
Unload Me 'Menutup Form 1
Else
MsgBox "User Name atau Password yang Anda Masukkan salah" _
& vbNewLine & "Silahkan Coba lagi !!", vbCritical, "Warning!!"
Text1 = ""
Text2 = ""
Text1.SetFocus
End If
End Sub
Private Sub Command2_Click()
Unload Me
End Sub

.5. Press F5 to see the result.



6. Try to fill in Username and Password with "admin" then click Login, then Form2 or Main Form window will be displayed.

So how to make a Simple Login Form, Hopefully Helpful ....

Komentar

Postingan populer dari blog ini

Cimpe Makanan Khas Kutacane (Suku Alas)

How to Install .NET Framework 3.5 in Windows 10 Offline

How to Provide Logo of Watermark with Photoshop