Article View: borland.public.cppbuilder.nativeapi
Article #13773Re: TrayIcon problem
From: Remy Lebeau (TeamB)
Date: Fri, 12 Sep 2003 16:56
Date: Fri, 12 Sep 2003 16:56
24 lines
1959 bytes
1959 bytes
"vERUs" <-verus-@telia.com> wrote in message news:3f61f63a@newsgroups.borland.com... > That explains a few things, that solved the problem. > With the code below, the trayicon is no longer affected If you stop to think about it for a moment, you'll probably understand why this way works while the other way didn't. Setting the FormStyle forces the form's underlying HWND to be destroyed and recreated. A tray icon is associated with a given HWND handle for receiving notifications from the icon. If you do something that destroys the HWND, the tray icon no longer has any valid window to work with. The OS is most likely detecting that and destroying the icon automatically since it won't be able to work correctly anymore. Gambit --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.515 / Virus Database: 313 - Release Date: 9/1/03
Technical Details
Message-ID:
<3f61fa9b$1@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-03!sn-xit-01!sn-xit-08!supernews.com!newsfeed.wirehub.nl!news.kweb.on.ca!KWeb!newsgroups.borland.com!not-for-mailReferences:
<3f60760e@newsgroups.borland.com> <3f60a272@newsgroups.borland.com> <3f610ea7@newsgroups.borland.com> <3f6110cb@newsgroups.borland.com> <3f61f63a@newsgroups.borland.com>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 10cc67,4c15741c747f36c X-Google-Attributes: gid10cc67,public X-Google-ArrivalTime: 2003-09-12 10:04:03 PST From: "Remy Lebeau \(TeamB\)" <gambit47@yahoo.com> Newsgroups: borland.public.cppbuilder.nativeapi References: <3f60760e@newsgroups.borland.com> <3f60a272@newsgroups.borland.com> <3f610ea7@newsgroups.borland.com> <3f6110cb@newsgroups.borland.com> <3f61f63a@newsgroups.borland.com> Subject: Re: TrayIcon problem Date: Fri, 12 Sep 2003 09:56:37 -0700 Lines: 26 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2800.1158 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165 NNTP-Posting-Host: 207.175.226.26 Message-ID: <3f61fa9b$1@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1063385755 207.175.226.26 (12 Sep 2003 09:55:55 -0700) Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-03!sn-xit-01!sn-xit-08!supernews.com!newsfeed.wirehub.nl!news.kweb.on.ca!KWeb!newsgroups.borland.com!not-for-mail