|
-
May 6th, 2000, 09:15 PM
#1
Thread Starter
New Member
I have written an app that runs in the systray of windows to manage the app suite i have created. The problem is, when i close the app (by having vb send an End statement), the icon for the app still appears until i move my mouse over the systray. Is there a way i can remove the icon before closing down the app so it is gone right away? I don't want to confuse my customers too much.
-
May 7th, 2000, 01:10 AM
#2
transcendental analytic
First, don't use end, it might not unload everything in your app, eating up memory and resources.
Then, are you using an activeX that works with the system tray or do you have your own code to do it?
Use  
writing software in C++ is like driving rivets into steel beam with a toothpick.
writing haskell makes your life easier:
reverse (p (6*9)) where p x|x==0=""|True=chr (48+z): p y where (y,z)=divMod x 13
To throw away OOP for low level languages is myopia, to keep OOP is hyperopia. To throw away OOP for a high level language is insight.
-
May 7th, 2000, 08:07 AM
#3
Thread Starter
New Member
Method
I'm using an end statment that then lets the queryunload procedure run. This unloads the form i enacpsulated the systray icon stuff in and then sets the variable to nothing. In the queryunload procedure of the form that has the icon stuff, i run the Shell_notifyIcon function with NIM_DELETE as the flag. This runs fine, it just doesn't refresh the desktop/systray after doing it. What i need is to somehow tell the systray to refresh so the icon disappears.
-
May 7th, 2000, 03:36 PM
#4
transcendental analytic
Put a break in the querry unload and see if it stops there, or else you should unload the form with unload command
Use  
writing software in C++ is like driving rivets into steel beam with a toothpick.
writing haskell makes your life easier:
reverse (p (6*9)) where p x|x==0=""|True=chr (48+z): p y where (y,z)=divMod x 13
To throw away OOP for low level languages is myopia, to keep OOP is hyperopia. To throw away OOP for a high level language is insight.
-
May 7th, 2000, 11:47 PM
#5
This works fine at my machine:
Shell_NotifyIcon NIM_DELETE, nid
I wouldn't use the end statement. If the problem persists, you could try sending a WM_PAINT message to the systray.
Sorry I couldn't be of much help.
-
May 7th, 2000, 11:53 PM
#6
Thread Starter
New Member
I guess that's my ultimate question. How do i send a WM_PAINT message to the systray?
-
May 8th, 2000, 03:37 AM
#7
transcendental analytic
My tray app, have no wm_paints in it, and it works fine. Do you want the source?
Use  
writing software in C++ is like driving rivets into steel beam with a toothpick.
writing haskell makes your life easier:
reverse (p (6*9)) where p x|x==0=""|True=chr (48+z): p y where (y,z)=divMod x 13
To throw away OOP for low level languages is myopia, to keep OOP is hyperopia. To throw away OOP for a high level language is insight.
-
May 8th, 2000, 04:06 AM
#8
Thread Starter
New Member
Sure, i'll give anything a shot.
-
May 8th, 2000, 04:26 AM
#9
transcendental analytic
Use  
writing software in C++ is like driving rivets into steel beam with a toothpick.
writing haskell makes your life easier:
reverse (p (6*9)) where p x|x==0=""|True=chr (48+z): p y where (y,z)=divMod x 13
To throw away OOP for low level languages is myopia, to keep OOP is hyperopia. To throw away OOP for a high level language is insight.
-
May 9th, 2000, 12:41 AM
#10
I have to correct myselve. Although sending a WM_PAINT message would refresh the systray, this should not be necesary if the icon was deleted successfully. If the icon was not deleted successfully refreshing the systray would only delete the icon, if the app that placed it there was not running anymore, so this would not help.
The only thing I can think about is that you might have declared the nid local to a procedure. When deleting the icon, you would send an empty NOTIFYICONDATA structure, and the delete would fail. If this is the case, declare the variable at module level (Private or Public as appropriate).
I know this is far fetched, but it is (next to the End statement) the only thing I can think about.
-
May 9th, 2000, 03:57 PM
#11
Addicted Member
Try my code at
http://vbcity.com/vbcode/en/click.asp?id=42
it's working perfectly. Don't forget to place the DeleteIcon() into Form_Unload() method.
Regards
-
May 10th, 2000, 12:15 AM
#12
Thread Starter
New Member
Well i tried to look at kedaman's code, but i get a file not found error. Then when i try to go to his site, i'm greeted with the notification that a virus is being installed on my PC. Thanks. I also tried smalig's site, but my DNS server can't find vbcity.com anywhere.
-
May 10th, 2000, 03:16 AM
#13
transcendental analytic
What file is missing? Any error messages?
Don't worry about the virus, my homepages do that to everyone that visits it.
Use  
writing software in C++ is like driving rivets into steel beam with a toothpick.
writing haskell makes your life easier:
reverse (p (6*9)) where p x|x==0=""|True=chr (48+z): p y where (y,z)=divMod x 13
To throw away OOP for low level languages is myopia, to keep OOP is hyperopia. To throw away OOP for a high level language is insight.
-
May 16th, 2000, 03:46 AM
#14
Thread Starter
New Member
What i mean is that when i try to follow your URL link, is says Error 404 File not found. Is it possible you didn't make it readable to the world(everyone)?
-
May 16th, 2000, 08:12 PM
#15
transcendental analytic
Well, my page is totally reincarnated:
http://www.geocities.com/kedasu
Use  
writing software in C++ is like driving rivets into steel beam with a toothpick.
writing haskell makes your life easier:
reverse (p (6*9)) where p x|x==0=""|True=chr (48+z): p y where (y,z)=divMod x 13
To throw away OOP for low level languages is myopia, to keep OOP is hyperopia. To throw away OOP for a high level language is insight.
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
|