It appears you have not yet registered with DEVPPL. To register please click here... (it's fast, easy and free!)

Forum

Log In Sponsors
Board index Programming Visual Basic Forum

if help

Moderator: dafunkymunky

if help

Postby Jragon on Sun May 09, 2010 4:23 pm

hello, i have been making a clicking madness game

and my question is...

when label1 gets to 100 i want timer 1 and timer2 to stop

my code i used inside of label1 is...

Code: Select all
if label1.text - "100" then
timer1.stop
timer2.stop
msgbox("winner!!")






none of the code dose anything please help =]
Jragon
 
Posts: 1
Joined: Sun May 09, 2010 4:20 pm

Re: if help

Postby bytelogik on Sat May 15, 2010 9:52 am

Code: Select all
if label1.text - "100" then
     timer1.stop
     timer2.stop
     msgbox("winner!!")


If the timer control has an enabled property set it to false. e.g., timer1.enabled=false 'this is VB6, (I think you are using VB.NET)

If hope you have not typed it wrong in the if statement :
(the equal sign instead of a minus sign)
if label1.text - "100" then 'should it be if label1.text = "100" then

Hope this helps.
Good Luck.
bytelogik
 
Posts: 12
Joined: Tue Oct 06, 2009 7:24 pm


Who is online

Users browsing this forum: No registered users and 2 guests