0% found this document useful (0 votes)
11 views

VB

The document describes a program with a text box and four buttons. The first button clears the text box when clicked if text is entered. The second button prompts the user to exit the program. The third and fourth buttons convert the text to uppercase or lowercase respectively.
Copyright
© Attribution Non-Commercial (BY-NC)
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
11 views

VB

The document describes a program with a text box and four buttons. The first button clears the text box when clicked if text is entered. The second button prompts the user to exit the program. The third and fourth buttons convert the text to uppercase or lowercase respectively.
Copyright
© Attribution Non-Commercial (BY-NC)
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
You are on page 1/ 1

Public Class Form1

Private Sub TextBox1_TextChanged(ByVal sender As System.Object, ByVal e As S


ystem.EventArgs) Handles TextBox1.TextChanged
If TextBox1.Text = "" Then Button1.Enabled = False Else Button1.Enabled
= True
End Sub
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.E
ventArgs) Handles Button1.Click
Dim result As String
result = MsgBox(" este texto sera limpo a seguir", MsgBoxStyle.OkCancel)
If result = 1 Then TextBox1.Text = ""

End Sub
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.E
ventArgs) Handles Button2.Click
Dim result As String
result = MsgBox(" sair do programa ?", MsgBoxStyle.OkCancel)
If result = 1 Then End
End Sub
Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.E
ventArgs) Handles Button3.Click
Dim result As String
result = StrConv(TextBox1.Text, VbStrConv.Uppercase)
TextBox1.Text = result

End Sub
Private Sub Button4_Click(ByVal sender As System.Object, ByVal e As System.E
ventArgs) Handles Button4.Click
Dim result As String
result = StrConv(TextBox1.Text, VbStrConv.Lowercase)
TextBox1.Text = result
End Sub
End Class

You might also like