Minimizing a form to a taskbar icon

  • Thread starter Thread starter HardySpicer
  • Start date Start date
H

HardySpicer

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
 
HardySpicer said:
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

Put this on your "custom" minimize button:

Me.WindowState = FormWindowState.Minimized
 
Back
Top