Thursday, 22 March 2012

A Simple Timer Programme in VB6

Timer::-Most Useful Controls Of Visual BAsic.Its Help Us To Create for ScreenSaver And Other Most Bautiful Application.Interval And Enable Is a Main Property of Timer Control.Interval Is a time According to Interval property Value We Run our Application.If We Give interval =1000 Then We found 1 Second.
..
. 1 second=1000minisecond
The maximum Value of Interval Property=65535
When programme is running then Timer control is Not visible in Form
Timer control Perform Through Mini Second

First programme With the Using Of Timer Control
Compatibility::-Visual Basic 5,6
1.Choose A simple Standard Exe Form
2.Take 2 Label Control
3.Set Label Caption(AS-1st Label=Raaz & second label=Patel
4Take 2 Timer control
5.Set Timer 's Interval Property(Timer1=1000 & Timer 2=2000)
Then Codes Now
Private sub form_load()
label1.visible=False
Label2.visible=False
Timer1.enabled=true
timer2.enabled=false
end sub
private sub timer1_time()
label1.visible=True
if(label1.visible=true)then
label2.visible=false
end if
timer1.enabled=false
timer2.enabled=True
end sub

private sub timer2_time()
label2.visible=True
if(label2.visible=true)then
label1.visible=false
end if
timer2.enabled=false
timer1.enabled=True
end sub



Thanks
Blog By::-Rajesh Patel
Dr.C.V.Raman University Kota (Bilaspur)
E-mail::-Rajesh.patelp3034@gmail.com

No comments:

Post a Comment