Hi,
Yes you can, make a search in the newsgroup, I remember this was asked a
couple of weeks (months?) ago, I posted some code for it, I don;t have the
code here with me thought :(
You have to P/Invoke at least a function, to make the application dissapear
from the taskbar or from using ( alt+tab) .
If you don't find it; or if nobody post it; I will send you the code
tomorrow.
Cheers,
--
Ignacio Machin,
ignacio.machin AT dot.state.fl.us
Florida Department Of Transportation
"kurotsuke" <ku*******@yahoo.it> wrote in message
news:re********************************@4ax.com...
How can I hide a Form (instead of having it reduced to the taskbar)
when the minimize button is pressed in C# (there's an icon in the tray
bar)?
I added the code
protected override void OnResize(EventArgs e)
{
//hide the form
if
(this.WindowState==FormWindowState.Minimized)
{
this.Hide();
this.WindowState=FormWindowState.Normal;
}
else
{
base.OnResize (e);
}
}
The problem is that when I clic on the tray icon the form unhides and
appears minimized (I would like it to be just restored).
Thanks a lot.
Andy