devxlogo

Determining Exit Method

Determining Exit Method

Question:
I am currently experimenting with VB 3.0. In version 1.0 common dialogs provided the information about which button was used to exit from the dialog. I want to know how can I know how a common dialog object was exited? Is the answersuggested somehow in any variable?

Answer:
The assumption that is made when you use the CommonDialog is that the user will do something in the window and press the OK button. If the user does press the Cancel button, setting the CancelError property to “True” will cause the common dialog to generate a trappable error. Other than that, there are not any other ways to close the window.

devxblackblue

About Our Editorial Process

At DevX, we’re dedicated to tech entrepreneurship. Our team closely follows industry shifts, new products, AI breakthroughs, technology trends, and funding announcements. Articles undergo thorough editing to ensure accuracy and clarity, reflecting DevX’s style and supporting entrepreneurs in the tech sphere.

See our full editorial policy.

About Our Journalist