Form to the front
Forum rules
Do not post any licensing information in this forum.
Any code longer than three lines should be added as code using the 'Select Code' dropdown menu or attached as a file.
Do not post any licensing information in this forum.
Any code longer than three lines should be added as code using the 'Select Code' dropdown menu or attached as a file.
Form to the front
When my exe loads the main Form, it is hidden behind the open windows. Is there a way to bring the main form to the front?
Re: Form to the front
Thank you.jvierra wrote:Depends on how you designed your form and what the other Windows are. Some System Windows will always be on top.
I was expecting something like Form.Top = $true or Form.BringToFront = $true. I'm new. The tool is very new for me. Thank you for the help.
Re: Form to the front
PowerShellStudio form.jvierra wrote:Are we talking about a PowerShell Studio form or a hand built form?
Re: Form to the front
By default it will be topmost. If you are trying tolock it at the very front over all forms you will need to make API calls. Not sure if it is passible with PowerShell and a modal dialog.
Re: Form to the front
If you are asking about forms in a multiform project then the answer is no. Modal dialog always display at the top of the stack.Ravi Lobo wrote:When my exe loads the main Form, it is hidden behind the open windows. Is there a way to bring the main form to the front?
You can use an MDI form to allow multiple forms to be displayed but then you have to hand code the forms.
Re: Form to the front
Okay. That makes sense. Thank you.jvierra wrote: If you are asking about forms in a multiform project then the answer is no. Modal dialog always display at the top of the stack.
You can use an MDI form to allow multiple forms to be displayed but then you have to hand code the forms.
Re: Form to the front
I'm having this problem also. My project is a single form project and my form is set to TopMost = True.
The script runs in the background and waits for an event.
The FIRST time it sees that event, the form launches behind other windows that are open.
All SUBSEQUENT events it sees, it launches On Top as expected.
Any ideas?
The script runs in the background and waits for an event.
The FIRST time it sees that event, the form launches behind other windows that are open.
All SUBSEQUENT events it sees, it launches On Top as expected.
Any ideas?