|
-
Mar 11th, 2000, 07:20 AM
#1
Thread Starter
Member
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
-
Mar 11th, 2000, 07:41 AM
#2
Hyperactive Member
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
buzzwords are the language of fools
-
Mar 11th, 2000, 08:37 AM
#3
Thread Starter
Member
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
-
Mar 11th, 2000, 05:47 PM
#4
PowerPoster
Microsoft Online Library
You can always refer to the Microsoft Online Library at >> http://msdn.microsoft.com/isapi/msdn...m/hh1start.htm
-
Mar 12th, 2000, 01:33 AM
#5
Thread Starter
Member
Hi,
I still can not find it there. Any other ways I can find this info. This is killing me.
Thank,
Kevin
-
Mar 12th, 2000, 01:51 AM
#6
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
-
Mar 12th, 2000, 02:20 AM
#7
Thread Starter
Member
Hi,
My app does not have a form on a module. Will this still work??
Thanks,
Kevin
-
Mar 12th, 2000, 05:09 AM
#8
Hyperactive Member
Put in a form , and hide it at startup:
me.hide
buzzwords are the language of fools
-
Mar 12th, 2000, 07:02 AM
#9
Thread Starter
Member
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
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|