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 to close an idle vb application? 1

Status
Not open for further replies.

ByzantianX

Programmer
Dec 18, 2000
103
I would like to write a code that closes a vb application if it's idle for some time (for security reasons). Please, help.Thanks in advance
 
Use a Timer Control to wake up every minute and add a minute to a form-level variable and check if idle time has been exceeded, if it has then unload all forms. If any other control becomes active, its code must reset the accumulated time.
Code:
Dim frm as form
For Each frm in forms
    if not (frm is Me) then unload frm
Next
Unload thisform ' put in this forms name
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top