-
Hi,
I am writing a program that runs hidden in the background. My only problem is that when I run it, and then shut down or restart windows 98 se, it will not close it. It makes me close it after it says that it is not responding. How do I make it shut down automatically, when windows shuts down??
Thanks,
Kevin
-
I think you'll have to subclass and handle the message for Windows shutdown (look it up in MSDN). I can't think of another way off the top of me head :)
-
Thanks,
But that site on Microsoft no longer is there. They want you to buy some software. Is there any other way to find this info.??
Thanks,
Kevin
-
Microsoft Online Library
You can always refer to the Microsoft Online Library at >> http://msdn.microsoft.com/isapi/msdn...m/hh1start.htm
-
Hi,
I still can not find it there. Any other ways I can find this info. This is killing me.
Thank,
Kevin
-
If your app has a form, you could use the QueryUnload event to find out when windows is closing.
Code:
Private Sub Form_QueryUnload(Cancel As Integer, UnloadMode As Integer)
If UnloadMode = vbAppWindows Then
Unload Me 'or whatever needed to close the app
End If
End Sub
-
Hi,
My app does not have a form on a module. Will this still work??
Thanks,
Kevin
-
Put in a form , and hide it at startup:
me.hide
-
Hi,
I tried it in a form and then my program would not run. So, I put it in a module, and I am using Sub Main() and it works. Is there a Equivalent to Sub Form_Unload for Sub Main(). Also, unload.me will not work, and End will not either. What code do I enter to close the module??
Thaks,
Kevin