Skip to main content

         This documentation site is for previous versions. Visit our new documentation site for current releases.      

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

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.


  • Previous topic Does spyware detection software affect Studio's ability to interrogate and integrate applications?
  • Next topic How do I determine the active window in a Java MDI application?


Robotics System Architect Robotic Process Automation

Have a question? Get answers now.

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

Did you find this content helpful?

Want to help us improve this content?

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