The document contains code for several button click events and form load events. Button1_Click in the first section ends the form. Button2_Click gets the length and substring of TextBox1 text. The second section sets TextBox1 text on form load and Button1_Click sets TextBox2 to lowercase and TextBox3 to uppercase of TextBox1 text. Button2_Click ends the form. The third section has Button1_Click end the form. TextBox1_Click sets TextBox2 and 3 based on a string. TextBox1_TextChanged sets TextBox2 and 3 based on changes to TextBox1 text.
The document contains code for several button click events and form load events. Button1_Click in the first section ends the form. Button2_Click gets the length and substring of TextBox1 text. The second section sets TextBox1 text on form load and Button1_Click sets TextBox2 to lowercase and TextBox3 to uppercase of TextBox1 text. Button2_Click ends the form. The third section has Button1_Click end the form. TextBox1_Click sets TextBox2 and 3 based on a string. TextBox1_TextChanged sets TextBox2 and 3 based on changes to TextBox1 text.
The document contains code for several button click events and form load events. Button1_Click in the first section ends the form. Button2_Click gets the length and substring of TextBox1 text. The second section sets TextBox1 text on form load and Button1_Click sets TextBox2 to lowercase and TextBox3 to uppercase of TextBox1 text. Button2_Click ends the form. The third section has Button1_Click end the form. TextBox1_Click sets TextBox2 and 3 based on a string. TextBox1_TextChanged sets TextBox2 and 3 based on changes to TextBox1 text.
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)
Handles Button1.Click End End Sub
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)
Handles Button2.Click TextBox4.Text = Len(Trim(TextBox1.Text)) TextBox5.Text = Mid(Trim(TextBox1.Text), TextBox2.Text, TextBox3.Text) End Sub
Latihan 6
Private Sub Form6_Load(ByVal sender As System.Object, ByVal e As System.EventArgs)
Handles MyBase.Load Dim kal As String kal = "Visual Basic .Net 2010" TextBox1.Text = kal End Sub
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)
Handles Button1.Click TextBox2.Text = LCase(TextBox1.Text) TextBox3.Text = UCase(TextBox1.Text) End Sub
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)
Handles Button2.Click End End Sub Latihan 7 Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click End End Sub
Private Sub TextBox1_Click(ByVal sender As Object, ByVal e As System.EventArgs)
Handles TextBox1.Click TextBox2.Text = LCase("textbox1 di klik") TextBox3.Text = UCase("textbox1 di klik") End Sub
Private Sub TextBox1_TextChanged(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles TextBox1.TextChanged TextBox2.Text = LCase(TextBox1.Text) TextBox3.Text = UCase(TextBox1.Text) End Sub