winform: minimise window to systray ?

T

Tom

Hi friends

I was wondering how can I minimise a winform into the system tray ?

Thanks
Tom
 
N

Nicholas Paldino [.NET/C# MVP]

Tom,

Basically, you would minimize your form normally, and then set the
ShowInTaskBar property to false, which will prevent the form from being
shown in the taskbar.

You also need to place an instance of the NotifyIcon class on your form,
so that it can show something in the system tray.

Hope this helps.
 
T

Tom

Hi,

What is the event triggered when the winform is minimised ?

thanks

Tom

Nicholas Paldino said:
Tom,

Basically, you would minimize your form normally, and then set the
ShowInTaskBar property to false, which will prevent the form from being
shown in the taskbar.

You also need to place an instance of the NotifyIcon class on your form,
so that it can show something in the system tray.

Hope this helps.


--
- Nicholas Paldino [.NET/C# MVP]
- (e-mail address removed)

Tom said:
Hi friends

I was wondering how can I minimise a winform into the system tray ?

Thanks
Tom
 
N

Nicholas Paldino [.NET/C# MVP]

Tom,

Hook up to the SizeChanged event, and in the event handler, check the
WindowState property to see if it is minimized.


--
- Nicholas Paldino [.NET/C# MVP]
- (e-mail address removed)

Tom said:
Hi,

What is the event triggered when the winform is minimised ?

thanks

Tom

in
message news:#[email protected]...
Tom,

Basically, you would minimize your form normally, and then set the
ShowInTaskBar property to false, which will prevent the form from being
shown in the taskbar.

You also need to place an instance of the NotifyIcon class on your form,
so that it can show something in the system tray.

Hope this helps.


--
- Nicholas Paldino [.NET/C# MVP]
- (e-mail address removed)

Tom said:
Hi friends

I was wondering how can I minimise a winform into the system tray ?

Thanks
Tom
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

Minimise to tray 2
override minimise ? 1
Which colour printer to buy? 2
Minimise Button 8
Reflection and winforms 12
Main window location 4
C# WinForm on Framwork1.1 and Framwork3.5 1
Convert winform to web. 12

Top