Question Restore a windows form which is minimized and has lost focus

Farmsie

New member
Joined
Dec 2, 2009
Messages
2
Programming Experience
Beginner
Hi, I would really like a bit of a nudge in the right direction.

I have created an app which has a timer control which, when activated and meets a certain criteria, launches a second form with an alert for the user to review and action. this works just fine.

Except.... when the main app is minimised and has lost focus, instead of launching the second form to a normal windows state it opens and sits in a minimized state itself and just flashes. How can I get the the second form to restore to a normal windows state?

I have tried form2.focus and tried the windowsstate=normal etc but I'm still barking up the wrong tree. Dont necessarily need someone to send me the code just a couple of pointers would do.

thanks for any help.

Farmsie.
 
It sounds like you are displaying the new form as an owned form of the other. Owned forms are always minimised if their owner is minimised. In that case you either can't set an owner for the new form or else you'll need to restore the owner to see the owned form. If you're not sure whether you're displaying an owned form or not, please post the exact code you're using to create and display the new form.
 
Thanks very much, I will check the Ownership of the form. Like you say it maybe that the main form needs focus etc before restoring the owned.
 
Back
Top