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 

Minimize to tray?

 
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> C++ Builder
View previous topic :: View next topic  
Author Message
4600cc
Guest





PostPosted: Wed Apr 12, 2006 12:03 am    Post subject: Minimize to tray? Reply with quote



How do I minimize a form to tray? (BCB 2006)
Back to top
mydog21
Guest





PostPosted: Wed Apr 19, 2006 10:03 am    Post subject: Re: Minimize to tray? Reply with quote



hi

It's very easy for BCB 2006

Use this TTrayIcon for you want

Create this Component Your header file like that

TTrayIcon* m_TrayIcon;

then

create new Class when Form Created

m_TrayIcon= new TTrayIcon(this);

next

when you want event,

just do that

m_TrayIcon->visible= true;

and

Form->Hide();

it's easy!
Back to top
supersaiyanzero
Junior Member


Joined: 05 Mar 2006
Posts: 19
Location: United Kingdom

PostPosted: Wed Apr 19, 2006 8:36 pm    Post subject: How would you do it by clicking the minimise button? Reply with quote



Hello,
How would you do this if you wanted to click the minimise button in the top right corner of your programme's frame?

Thanks
_________________
SA (United Kingdom)
Back to top
View user's profile Send private message MSN Messenger
4600cc
Guest





PostPosted: Thu Apr 20, 2006 3:03 pm    Post subject: Re: How would you do it by clicking the minimise button? Reply with quote

Quote:
How would you do this if you wanted to click the minimise button in
the top right corner of your programme's frame?


Do what?
Back to top
supersaiyanzero
Junior Member


Joined: 05 Mar 2006
Posts: 19
Location: United Kingdom

PostPosted: Fri Apr 21, 2006 9:00 am    Post subject: Re: How would you do it by clicking the minimise button? Reply with quote

4600cc wrote:
Quote:
How would you do this if you wanted to click the minimise button in
the top right corner of your programme's frame?


Do what?


If I wanted to minimise the programme to the system tray by clicking the minimise button in the top right corner?

thanks.
_________________
SA (United Kingdom)
Back to top
View user's profile Send private message MSN Messenger
4600cc
Guest





PostPosted: Fri Apr 21, 2006 10:03 pm    Post subject: Re: How would you do it by clicking the minimise button? Reply with quote

Quote:
If I wanted to minimise the programme to the system tray by clicking
the minimise button in the top right corner?



// OnAppMinimize, handler for TApplication::OnMinimize
//---------------------------------------------------------------------------
void __fastcall TMainForm::OnAppMinimize(TObject *Sender)
{
tiTrayIcon->Visible = true;
Hide();
}

// On tiTrayIcon double click
//---------------------------------------------------------------------------
void __fastcall TMainForm::tiTrayIconDblClick(TObject *Sender)
{
Show();
Application->BringToFront();
tiTrayIcon->Visible = false;
}
Back to top
supersaiyanzero
Junior Member


Joined: 05 Mar 2006
Posts: 19
Location: United Kingdom

PostPosted: Sun Apr 23, 2006 11:43 am    Post subject: Re: How would you do it by clicking the minimise button? Reply with quote

4600cc wrote:
Quote:
If I wanted to minimise the programme to the system tray by clicking
the minimise button in the top right corner?



// OnAppMinimize, handler for TApplication::OnMinimize
//---------------------------------------------------------------------------
void __fastcall TMainForm::OnAppMinimize(TObject *Sender)
{
tiTrayIcon->Visible = true;
Hide();
}

// On tiTrayIcon double click
//---------------------------------------------------------------------------
void __fastcall TMainForm::tiTrayIconDblClick(TObject *Sender)
{
Show();
Application->BringToFront();
tiTrayIcon->Visible = false;
}


Sweet! Thanks, worked wonders!!!! Thanks a lot!
_________________
SA (United Kingdom)
Back to top
View user's profile Send private message MSN Messenger
Display posts from previous:   
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> C++ Builder 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.