|
-
Mar 31st, 2000, 05:15 AM
#1
Thread Starter
New Member
After fumbeling arround with the aspect of writing to the system tray I found your SYSTRAY1 example quite smooth and functional. However - one aspect that I thought would be relatively easy to incorporate was an "EXIT" - Not so.
If "unhook" is run in one sub procedure and End is run in another then life is just fine. However, if I set it up to "unhook" and "End" all in the same sub procedure then it ends with such violence that VB vaporizes (VB5 by the way)
I would really like to have an exit option on the System Tray popup menu - much smoother than re-0pening the main form and closing from there.
Thoughts / comments / suggestions would really be appreciated.
Thanks
-
Mar 31st, 2000, 05:29 AM
#2
Frenzied Member
This is a complete guess but try putting a DoEvents inbetween the unhooking and the end command, unhooking the form might take some processes in another thread to implicate and you're not releasing the thread long enough for that to take place.
Or try not using the End Command at all, Dan Appleman says never to use the end command ever ever, especially when using API calls Try unloading all your forms instead.
-
Mar 31st, 2000, 09:43 AM
#3
Addicted Member
If you want i can
send you the source and to an activeX I made to add and remove icons from the tray it doesn't use any subclassing so won't crash VB or anything else if you want it i need your e-mail
Magiaus
Visual Basic 6.0 SP5
Visual C++ 6.0 SP5
The only sovereign you can allow to rule you is reason.
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
|