BorlandTalk.com Forum Index BorlandTalk.com
Borland discussion newsgroups
 
Archives   FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

TTrayIcon::ShowMenu()

 
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> C++ Builder (Upgrade)
View previous topic :: View next topic  
Author Message
Alain M. Dube
Guest





PostPosted: Wed Feb 01, 2006 2:27 pm    Post subject: TTrayIcon::ShowMenu() Reply with quote



Hello;

I've just upgraded from BCB6 to BDS2006. May application used the sample
TTrayIcon when developed under BCB6. After the upgrade, the TTrayIcon
persists but the ::ShowMenu() method seems to have disappeared. I used this
method to cause the Tray Icon's popup menu to be displayed from a TButton's
OnClick event. This is done to accommodate Touch Screen users.

Is there an alternative means to programmatically display the Tray Icon's
popup menu (like there is to display bubble help)?

Thanks in advance.

Regards;

Alain


Back to top
Alain M. Dube
Guest





PostPosted: Wed Feb 01, 2006 6:57 pm    Post subject: Re: TTrayIcon::ShowMenu() Reply with quote



Solution per Borland Support:

The TTrayIcon class has changed a bit in BDS 2006, but you can still
accomplish the same thing. In BDS 2006, the following OnClick event handler
code assigns a popup menu to the tray icon and then displays the menu where
the user has clicked:
void __fastcall TForm1::Button1Click(TObject *Sender)
{
TrayIcon1->PopupMenu = PopupMenu1;
TrayIcon1->PopupMenu->Popup(Mouse->CursorPos.x, Mouse->CursorPos.y);
}


"Alain M. Dube" <adube (AT) cadencesoftware (DOT) com> wrote

Quote:
Hello;

I've just upgraded from BCB6 to BDS2006. May application used the sample
TTrayIcon when developed under BCB6. After the upgrade, the TTrayIcon
persists but the ::ShowMenu() method seems to have disappeared. I used
this method to cause the Tray Icon's popup menu to be displayed from a
TButton's OnClick event. This is done to accommodate Touch Screen users.

Is there an alternative means to programmatically display the Tray Icon's
popup menu (like there is to display bubble help)?

Thanks in advance.

Regards;

Alain




Back to top
Display posts from previous:   
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> C++ Builder (Upgrade) All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2006 phpBB Group
SEO toolkit © 2004-2006 webmedic.