Minimizing a form to a taskbar icon

Minimizing a form to a taskbar icon

Post by HardySpice » Sat, 20 Jun 2009 08:31:58


I have found a way to minimise a form so that a small icon appears on
the bottom right of the taskbar.
Trouble is that the "-" bit on the top right of every form is not
there on my form as I am using an irregular form and that bit is
invisible. (ie I use a bmp file instead of the main form). Can I make
an artificial minimising bit on my form.

at present I can put buttons and so on - on the form itself with no
problem so a small button to minimize the form would be ok - but what
code do I put on it? It needs to be identical in function to the "-"
bit on the top right of every form.


Hardy
 
 
 

Minimizing a form to a taskbar icon

Post by Teme6 » Sat, 20 Jun 2009 10:19:00


Put this on your "custom" minimize button:

Me.WindowState = FormWindowState.Minimized

--

Teme64 @ http://www.yqcomputer.com/