Solved

?Recognize WindowsNT-Shutdonw via API? (under NT)

Posted on 1998-08-13
4
136 Views
Last Modified: 2010-04-30
I want to recognize the windows shutdown with VB4.0. The Form_Unload does not work because
my programm has a loop in the Form_Load! So I need to recognize the windows-shutdown from somewhere else.
API?
OR: if you know how to palce my loop out of the Form_Load so that it is also startet immediately when running.

swilt wrote:" loop in the Form_Activate and look at UnloadMode in the Form_QueryUnload"
HOW??? Explain???
0
Comment
Question by:lole
  • 2
4 Comments
 
LVL 2

Expert Comment

by:swilt
ID: 1468741
loop in the Form_Activate and look at UnloadMode in the Form_QueryUnload
0
 

Author Comment

by:lole
ID: 1468742
Edited text of question
0
 

Author Comment

by:lole
ID: 1468743
Swilt, pleas give na example that works
0
 
LVL 14

Accepted Solution

by:
waty earned 50 total points
ID: 1468744
The only thing to do is adding a DoEvents in your loop in Form_Load

Sub Form_Load
  Do while True
     ...
     DoEvents
     ...
  Loop
End Sub

Sub Form_UnLoad
  ' *** Quit
End Sub

0

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

There are many ways to remove duplicate entries in an SQL or Access database. Most make you temporarily insert an ID field, make a temp table and copy data back and forth, and/or are slow. Here is an easy way in VB6 using ADO to remove duplicate row…
Introduction While answering a recent question (http://www.experts-exchange.com/Q_27402310.html) in the VB classic zone, I wrote some VB code in the (Office) VBA environment, rather than fire up my older PC.  I didn't post completely correct code o…
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…

821 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question