First. This Is my finished Key Generator that I created about 20 minutes ago.
View 1
View 2
View 3
Here is my code.
Public Class Form1 Private Sub Label1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) End Sub Private Sub GroupBox1_Enter(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles GroupBox1.Enter End Sub Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click If txtbox1.Text = txtboxa1.Text And txtbox2.Text = txtboxb1.Text And txtbox3.Text = txtboxc1.Text And txtbox4.Text = txtboxd1.Text Then lbl1.Text = "Key" lbl1.Text &= " Correct" Else lbl1.Text = "Key" lbl1.Text &= " Incorrect" End If End Sub Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click Dim rnd As New Random txtboxa1.Clear() txtboxb1.Clear() txtboxc1.Clear() txtboxd1.Clear() For i As Integer = 0 To 3 txtboxa1.Text &= rnd.Next(0, 9) txtboxb1.Text &= rnd.Next(0, 9) txtboxc1.Text &= rnd.Next(0, 9) txtboxd1.Text &= rnd.Next(0, 9) Next End Sub Private Sub TextBox4_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles txtbox4.TextChanged End Sub Private Sub Label7_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles lbl1.Click End Sub Private Sub txtbox1_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles txtbox1.TextChanged End Sub End Class
Basically, .text means it is the text inside of the selected item. So if we create a text box and we want to deal with the property text we would take the name of a textbox which would be textboxname.text and modify what we want. Because VB is such a basic program and is also a very advanced program as well you can make many many useful things. From a simple login box to a multi media GUI that is sold around the world.
If you want to learn more about VB properties you can check them out here.
Visual Basic Code , VB Code , VB.NET Code Or just search code call and keep yourself updated with my guides. I recommend using codecall for coding tutorials because we provide some of the best.


Sign In
Create Account



Back to top









