Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How can I run a function without open an run the visual basic form. 1

Status
Not open for further replies.

ii128

Programmer
May 18, 2001
129
US

How can I run a function periodically in a visual basic form without opening and running the visual basic form.
 
You can't.
By peridically, do you mean based on an interval of time that has passed? A Timer Event can run a function inside or outside a form BUT the form with the Timer must be open the whole time but it need not be visible. There are other API Timers with which I am not familar but I do not know if they can trigger an event in VB.
 
The timer API do not trigger an "Event" in VB, instead, they perform a callback to a public function within a Bas Module. In order for the callback to work, you need to pass the address of the call back function (using the AddressOf operator) when you start the timer. But this will work without a Form or the timer OCX. - Jeff Marler B-)
 
jmarler:

What is the exect coding to do this?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top