public class simple counter
dim time counted as long =0 private sub Start_button_click (byval sender as system .object, by val e as system.event args) handles
counter_timer.enabled =ture
end sub
private sub counter _timer _tick
time counted +=1
textbox1.text = timecounted
end sub
private sub stop button click
counter _timer.enabled=false
end sub
private sub reset button click
textbox1.text ="0"
time count =0
end sub
private sub button click
counter timer.interval = numericupdown.value
end sub
end class
private sub timer1_tick
if textbox1.forecolor =color.black then
textbox1.forecolor =color.green
else if textbox1.forecolor = color.green then
textbox1.forecolor=color.red
else if textbox1.forecolor= color.red then
textbox1.forecolor=color.yellow
esle if textbox1.forecolor =color.yellow then
textbox1.forecolor=color.green
end if
end sub
private sub form 1 loading
timer.strat ()
private sub timer tick
progressbar1.increment(3)
if progressbar1.value = progressbar1.maximum then
me.hide()
form2.show()