10-Register New User

2
9164

This tutorial is all about Register New User.
In this tutorial, I’m going to teach you how to register a new user in the User’s Registration Form. with this, you can add the users with there different types.

 

 

So let’s begin:

 

 

Open the file of “EmployeesInformationSystem” that you had created and go to the “ManageUserForm“. After that, double click the Form and add the following code for adding the items in the ComboBox, and setting up the “Password” TextBox.

[vbnet] Private Sub ManageUserForm_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
‘MAKING THE TEXT INTO DOTS IN THE PASSWORD TEXTBOX
txtPassword.UseSystemPasswordChar = True
‘ADD ITEM IN THE COMBOBOX
With cboType.Items
.Add(“Administrator”)
.Add(“Staff”)
.Add(“Encoder”)
End With
End Sub
[/vbnet]

Go back to the Form Design and double click the “Save” Button to fire the Click event handler of it. Set a insert query and call a method that you had created in saving the data in the MySQL Database.

[vbnet] Private Sub btnSave_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnSave.Click
query = “insert into useraccounts (USER_ID, UNAME, USERNAME, PASS, TYPE)” & _
“values (‘” & txtUserId.Text & “‘,'” & txtName.Text & “‘,'” & txtUsername.Text & _
“‘,'” & txtPassword.Text & “‘,'” & cboType.Text & “‘)”
mysqlCreate(query)
End Sub
[/vbnet]

 

Readers might read also:

 

 

Facebook Comments

2 COMMENTS

  1. salut, je voudrais savoir a manière dont tomber enceinte plus vite car ça va faire 8mois que l’on essaye de posséder un bambin. Merci de me répondre terriblement rapidement, une grand merci.

LEAVE A REPLY

Please enter your comment!
Please enter your name here

This site uses Akismet to reduce spam. Learn how your comment data is processed.