473,387 Members | 1,318 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

winform: minimise window to systray ?

Tom
Hi friends

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

Thanks
Tom
Nov 16 '05 #1
3 6121
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]
- mv*@spam.guard.caspershouse.com

"Tom" <to********@optushome.com.au> wrote in message
news:41***********************@news.optusnet.com.a u...
Hi friends

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

Thanks
Tom

Nov 16 '05 #2
Tom
Hi,

What is the event triggered when the winform is minimised ?

thanks

Tom

"Nicholas Paldino [.NET/C# MVP]" <mv*@spam.guard.caspershouse.com> wrote in
message news:#e**************@TK2MSFTNGP09.phx.gbl...
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]
- mv*@spam.guard.caspershouse.com

"Tom" <to********@optushome.com.au> wrote in message
news:41***********************@news.optusnet.com.a u...
Hi friends

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

Thanks
Tom


Nov 16 '05 #3
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]
- mv*@spam.guard.caspershouse.com

"Tom" <to********@optushome.com.au> wrote in message
news:41***********************@news.optusnet.com.a u...
Hi,

What is the event triggered when the winform is minimised ?

thanks

Tom

"Nicholas Paldino [.NET/C# MVP]" <mv*@spam.guard.caspershouse.com> wrote
in
message news:#e**************@TK2MSFTNGP09.phx.gbl...
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]
- mv*@spam.guard.caspershouse.com

"Tom" <to********@optushome.com.au> wrote in message
news:41***********************@news.optusnet.com.a u...
> Hi friends
>
> I was wondering how can I minimise a winform into the system tray ?
>
> Thanks
> Tom
>
>



Nov 16 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: charlesh3 | last post by:
Hi - I'd like to write a VB6 program to add a couple of text based clocks (for different time zones) to the systray so they'll always be visible. I can add an icon to the systray, but the API's...
6
by: Action | last post by:
I can add a systray icon in normal windows application... but when i do it in windows service, the systray icon just don't show up is that because i don't have any "component" to contain the...
3
by: Jon Bosker | last post by:
I have written an application that lives in the systray but when I try to close windows or logout it does not close my application and therefore prevents windows from shutting down or logging me...
4
by: mario | last post by:
How to put an application in systray with F1 or any shortcut button?
1
by: Christoph Engelhardt | last post by:
Hi newsgroup, What I intend to do: Write a small programm, that will add a new Button to every Window right beside the Buttons for minimizing, maximizing and closing the window in the window's...
1
by: redneon | last post by:
I'm trying to add another button to a window's title bar to use as a "keep this window on top" button. I've managed to draw the button using the code below (C#) but I'm having a couple of other...
4
by: Blaine | last post by:
Does anyone know how I can hide a form from the TaskManager? I've set the ShowInTaskbar to False, but when using Alt-TAB to switch between applications, it appears as a blank icon. I can set it...
5
by: smarty | last post by:
I have an example of code that allows and application to minise to the notification tray but how can I override the minimise and close buttons to ensure they always go back to the notify tray...
1
by: Pia Stevens | last post by:
A program opened at start a console window. How can I automatically minimized this window to Systray (not Taskbar)? Pia
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.