Skip to main content

How do I detect when a Windows form is being closed?

Suggest edit Updated on September 10, 2021

When a user closes a Windows form that Robot Studio created, the system actually hides the form instead of closing it.

To detect when a user has closed a Robot Studio-created Windows form, use the VisibleChanged event. Check the Visible property after this event has occurred, and if it is False, then the form has been closed.


Did you find this content helpful? YesNo

Have a question? Get answers now.

Visit the Collaboration Center to ask questions, engage in discussions, share ideas, and help others.

Ready to crush complexity?

Experience the benefits of Pega Community when you log in.

We'd prefer it if you saw us at our best. is not optimized for Internet Explorer. For the optimal experience, please use:

Close Deprecation Notice
Contact us