Minimizing a form to a taskbar icon

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
 
T

Teme64

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
 

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

Top