| View previous topic :: View next topic |
| Author |
Message |
4600cc Guest
|
Posted: Wed Apr 12, 2006 12:03 am Post subject: Minimize to tray? |
|
|
How do I minimize a form to tray? (BCB 2006) |
|
| Back to top |
|
 |
mydog21 Guest
|
Posted: Wed Apr 19, 2006 10:03 am Post subject: Re: Minimize to tray? |
|
|
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
|
Posted: Wed Apr 19, 2006 8:36 pm Post subject: How would you do it by clicking the minimise button? |
|
|
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 |
|
 |
4600cc Guest
|
Posted: Thu Apr 20, 2006 3:03 pm Post subject: Re: How would you do it by clicking the minimise button? |
|
|
| 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
|
Posted: Fri Apr 21, 2006 9:00 am Post subject: Re: How would you do it by clicking the minimise button? |
|
|
| 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 |
|
 |
4600cc Guest
|
Posted: Fri Apr 21, 2006 10:03 pm Post subject: Re: How would you do it by clicking the minimise button? |
|
|
| 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
|
Posted: Sun Apr 23, 2006 11:43 am Post subject: Re: How would you do it by clicking the minimise button? |
|
|
| 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 |
|
 |
|