open form minimised

D

- Dan -

I have an assembly that opens minimised and uses a notify icon in the system
tray. IN the new() I have
Me.ShowInTaskbar = False

and when the form loads I use
Me.WindowState = FormWindowState.Minimized

but the form opens sort-of minimised but it minimises to a small bar above
the start button. I dont want to see the small bar, i want it minimised and
not visible except forthe notify icon in the system tray.

do you have any thoughts?
 
H

Herfried K. Wagner [MVP]

* " - Dan - said:
I have an assembly that opens minimised and uses a notify icon in the system
tray. IN the new() I have
Me.ShowInTaskbar = False

and when the form loads I use
Me.WindowState = FormWindowState.Minimized

but the form opens sort-of minimised but it minimises to a small bar above
the start button. I dont want to see the small bar, i want it minimised and
not visible except forthe notify icon in the system tray.

In the form's 'Resize' event check its 'WindowState', if it's
'Minimized', hide the form.
 
D

- Dan -

THanks. I had to put

If Me.WindowState = FormWindowState.Minimized Then
Me.Hide()
End If

in the activated event, not resize. when it was in resize is was not
firing. when does the resize event get fired?
 
H

Herfried K. Wagner [MVP]

* " - Dan - said:
If Me.WindowState = FormWindowState.Minimized Then
Me.Hide()
End If

in the activated event, not resize. when it was in resize is was not
firing. when does the resize event get fired?

Add a handler and press F1.
 
H

Herfried K. Wagner [MVP]

* "=?Utf-8?B?LSBEYW4gLQ==?= said:
Im sorry Herfried you are smarter than me. i do not understand what
you are trying to tell me. i know F1 is help. Are you trying to say
something like - just look it up yourself?

LOL. MSDN says:

<msdn>
Occurs when the control is resized.
</msdn>

Forms are controls. On my system, 'Resize' is fired if I minimize a
form.
 

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