tags:

views:

44

answers:

1

Is there a way to force a form to be active and shown?

From another form i am doing:

Me.Hide
Form2.Show

When this code is run, the Form2 is minimized.

I've also tried:

Me.WindowState = FormWindowState.Normal

in the load event, and it still loaded it in minimized mode.

+1  A: 

Try Me.BringToFront(); or you can set the property TopMost true and thus the form will be always on top.

Fiur
bringtofront did not work, topmost is good but not exactly what i want
I__
Have you tried Me.Show(); and Me.BringToFront(); togheter in this order?
Fiur
yes didnt work just tried it
I__
Maybe you should be more specific and explain the flow in which this happens. Are you sure those lines of code are hit by the compiler and still nothing happens ?
Fiur
maybe you could explain why TopMost=true is not satisfactory.
Cheeso
its not satisfactory because then the form does not hide behind other apps if u select to view another ap
I__