Skip to Content

Hi Experts, i want to know this type of error handling

Apr 20, 2017 at 02:36 AM


avatar image
Former Member

When user click on the menu to open a Window form inside the application, i want to check is current windows form is already opened or not. If windows form is opened already i want to activate the already opened window form else i have to open the new windows form can you help me out on this

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

1 Answer

avatar image
Former Member Apr 20, 2017 at 08:59 AM

Hi Michael,

You don't specify if this is a system form or a user defined form.

For a system form you can check if a form of the same type is already opened using the Application.Forms collection. Note that it's standard behavior to allow system forms to have multiple instances open at the same time.

For a user form that allows multiple instances, you can use the same as for the system forms. However with user forms you can specify the id of the form, and if you use a fixed id only one form can be opened (this is enforced by B1 and it will throw an exception if you attempt to open a second form).

Pedro Magueija

LinkedIn | Twitter | Blog

10 |10000 characters needed characters left characters exceeded