Thursday, November 11, 2010

How do I run vb functions automatically after the form loads?

I have a program that I want to start a function automatically after x amount of time. I know about the timer...but what can I use to start the timer on its own? Example code is appreciated. Thanks for your help.How do I run vb functions automatically after the form loads?
Set the timer in Form_Activate. Not everything is there when Form_Load starts. (The easy way to lose your mind is to reference controls in Form_Load - then try to figure out why half the code blows up.) The sequence is Form_Initialize, Form_Load, then Form_Activate.How do I run vb functions automatically after the form loads?
sub Form_load

time1.enabled = true

end form_load





I think it is something like that? I am not sure exactly what you want? It been awhile since ive worked with basic, ive found i like JAVA more.



You could alwaysjust enable the time in properties so that it is on when you run the program, then have the final line of code for the timer disable the timer(within the timer sub of course)
Call the function from the Form Load function

No comments:

Post a Comment