This document contains code for 3 different visual basic applications: 1) An electronic clock that displays the current time in seconds on a label, 2) A label that changes color every second when a timer is enabled, and 3) Three buttons that each change the background color of a button to red, green, or blue respectively when clicked.
This document contains code for 3 different visual basic applications: 1) An electronic clock that displays the current time in seconds on a label, 2) A label that changes color every second when a timer is enabled, and 3) Three buttons that each change the background color of a button to red, green, or blue respectively when clicked.
This document contains code for 3 different visual basic applications: 1) An electronic clock that displays the current time in seconds on a label, 2) A label that changes color every second when a timer is enabled, and 3) Three buttons that each change the background color of a button to red, green, or blue respectively when clicked.
Label.Text=Str(Now()) End ---------------------------------------------------- Color change every second of a text.
public Sub Button1_Click()
Timer1.Enabled=True End Public Sub Timer1_Timer() Dim t1,t2,t3 As Integer t1=Int(Rnd*255) t2=Int(Rnd*155) t3=Int(Rnd*55) Label1.Foreground=Color.RGB(t1,t2,t3) End ---------------------------------------------------- Button change Color
Public Sub Button1_Click()
assign3.Background=Color.Red End Public Sub Button2_Click() assign3.Background=Color.Green End Public Sub Button3_Click() assign3.Background=Color.Blue End