VB Simple Program

Today I will give an example of a simple program using Visual Basic.

Create a design form as follows:



And enter the following code:

Private Sub Option1_Click()
Label1.ForeColor = vbRed
End Sub
Private Sub Option2_Click()
Label1.ForeColor = vbBlue
End Sub
Private Sub Option3_Click()
Label1.ForeColor = vbYellow
End Sub
Private Sub Option4_Click()
Label1.ForeColor = vbBlack
End Sub
Private Sub Option10_Click()
Label1.FontSize = 12
End Sub
Private Sub Option11_Click()
Label1.FontSize = 14
End Sub
Private Sub Option5_Click()
Me.BackColor = vbWhite
Label1.BackStyle = 0
End Sub
Private Sub Option6_Click()
Me.BackColor = vbGreen
Label1.BackStyle = 0
End Sub
Private Sub Option7_Click()
Me.BackColor = vbMagenta
Label1.BackStyle = 0
End Sub
Private Sub Option8_Click()
Label1.FontSize = 8
End Sub
Private Sub Option9_Click()
Label1.FontSize = 10
End Sub

A few posts today, good luck. 
Title : VB Simple Program
Description : Today I will give an example of a simple program using Visual Basic. Create a design form as follows: And enter the following co...

0 Response to "VB Simple Program"

Posting Komentar

Gudang Hidup. Diberdayakan oleh Blogger.