Closing the Child form Closes the Parent form also

Ask questions about creating Graphical User Interfaces (GUI) in PowerShell and using WinForms controls.
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.
Post Reply
VenkatSGS
Posts: 3
Meble kuchenne na zamówienie - na wymiar - Wrocław
Joined: Mon Jan 20, 2020 10:55 am

Closing the Child form Closes the Parent form also

Post by VenkatSGS »

I have a multi-form project created in Powershell Studio. It contains atleast 20forms.
The Main form acts as a login window and the next form contains 5 buttons to open different forms. One button opens a child form and when I close it it closes the parent form also. However the other 4 buttons does not display this behaviour. I have done some basic de-bug however I could not find or fix why it is closing the parent form. Requesting your Help.

jvierra
Posts: 14213
Joined: Tue May 22, 2007 9:57 am
Contact:

Re: Closing the Child form Closes the Parent form also

Post by jvierra »

There is no way we can guess at what is causing this. It is clearly a coding or design issue. Without you code there is no way to guess at the cause.

VenkatSGS
Posts: 3
Joined: Mon Jan 20, 2020 10:55 am

Re: Closing the Child form Closes the Parent form also

Post by VenkatSGS »

with the help of your other post I found the solution.

The DialogResult of that button was set to Cancel. I changed it to none and it seems working.

Post Reply