Visual Basic Examples

Program 1:- To create Visual Basic application to find the area of rectangle. Code:- Private Sub Command1_Click() Text3.Text = Text1.Text * Text2.Text End Sub Private Sub Command2_Click() Text1.Text = " " Text2.Text = " " Text3.Text = " " End Sub /*************************Output**************************/ Program 2:- To create Visual Basic application to average of 3 numbers. Design Window:- Code:- Private Sub Command1_Click() Text4.Text = Str((Val(Text1.Text) + Val(Text2.Text) + Val(Text3.Text)) / 3) End Sub Private Sub Command2_Click() Text1.Text = " " Text2.Text = " " Text3.Text = " " Text4.Text = " " End Sub Private Sub Command3_Click() Unload Me End Sub /*************************Output**************************/ Program 3: To create Visual Basic application to illustrate Date-Time functions. Code:- Private Sub Command1_Click () Text1.Text = Dat...