![]() |
| The AccuTerm forum has moved. Go to community.rocketsoftware.com to register for the new Rocket forum. |
|
Post Reply
|
| Author | ||
MEDPSD
Newbie
Joined: March 05 2008 Location: United States Status: Offline Points: 32 |
Post Options
Thanks(0)
Quote Reply
Topic: Is there a way to query what forms are open?Posted: April 10 2018 at 11:39am |
|
|
I would like to not allow two forms in my application to be opened simultaneously. (They both allow updates and are stepping on one another.) I could do this via the program but was hoping there was a GUI call that would tell me what forms are currently open.
|
||
![]() |
||
Shrek59
Senior Member
Joined: December 04 2006 Location: New Zealand Status: Offline Points: 208 |
Post Options
Thanks(0)
Quote Reply
Posted: April 10 2018 at 2:16pm |
|
|
Here is a subroutine that I use to determine if an APPLICATION is in memory. In my programming, application and form usually relate to the same thing - but if you have multiple forms per application, then you may need to adapt this a bit:
SUBROUTINE Q.ATGUI.CHECK4APP(app, found, guierrors, guistate)That may give you some ideas. Read the documentation on "Global Objects" to get some more information on what is happening in this subroutine. Cheers, Brian |
||
![]() |
||
PSchellenbach
Admin Group
Moderator Joined: December 15 2003 Location: United States Status: Offline Points: 2150 |
Post Options
Thanks(0)
Quote Reply
Posted: April 16 2018 at 3:25pm |
|
|
Hi Patrick -
The boilerplate CLOSE event handler has an example of this. The default handler for a form's Close event hides the form, then retrieves the number of forms that are visible from the GPSTATUS property of the app object. If no forms are visible, the app object is deleted. Generally there is only one app object for a project so the program ends. As Brian mentioned, you can retrieve the GPSTATUS property of the global root object (GXROOT) to get a list or count of objects. The COL & ROW arguments select what type of information is returned. Call
Thanks, Pete |
||
![]() |
||
Post Reply
|
|
|
Tweet
|
| Forum Jump | Forum Permissions ![]() You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |