Hello All,
Is there any way to know the number of windows opened?
Thanks in advance.
With best regards.
Sudip
How to know number of windows opened
Moderator: Rathinagiri
How to know number of windows opened
With best regards,
Sudip
Sudip
- Rathinagiri
- Posts: 5481
- Joined: Tue Jul 29, 2008 6:30 pm
- DBs Used: MariaDB, SQLite, SQLCipher and MySQL
- Location: Sivakasi, India
- Contact:
Re: How to know number of windows opened
On seeing h_init.prg line no. 131 there is a system variable for all the form types defined by a HMG application.
The length of this _HMG_SYSDATA[69] will be equal to the total number of forms defined at any time.
So, you can use len(_HMG_SYSDATA[69]) to find out the number of forms.
Split child windows are also taken into account as forms. This array can have values "A","C","S","M","X"
"A" means Main Window
"C" means Child Window
"X" means Splitchild Window
"M" means Modal window
"S" means Standard window
If you want the number of main, modal and child windows use this loop.
Code: Select all
_HMG_SYSDATA [ 69 ] -> _HMG_aFormTypeSo, you can use len(_HMG_SYSDATA[69]) to find out the number of forms.
Split child windows are also taken into account as forms. This array can have values "A","C","S","M","X"
"A" means Main Window
"C" means Child Window
"X" means Splitchild Window
"M" means Modal window
"S" means Standard window
If you want the number of main, modal and child windows use this loop.
Code: Select all
nCount := 0
for i := 1 to len(_HMG_SYSDATA[69])
if (_HMG_SYSDATA[69,i] == "A" .or. _HMG_SYSDATA[69,i] == "M" .or. _HMG_SYSDATA[69,i] == "C")
nCount++
endif
next i
msginfo("There are "+str(nCount)+" windows defined")
East or West HMG is the Best.
South or North HMG is worth.
...the possibilities are endless.
South or North HMG is worth.
...the possibilities are endless.
Re: How to know number of windows opened
Thanks a lot Rathi,
Great!!!
I want it to ensure that when user will try to change Accounting Year online, no other window (except main window) will be opened
Your code will be extremely helpful to me
With best regards.
Sudip
Great!!!
I want it to ensure that when user will try to change Accounting Year online, no other window (except main window) will be opened
Your code will be extremely helpful to me
With best regards.
Sudip
With best regards,
Sudip
Sudip
- luisvasquezcl
- Posts: 1261
- Joined: Thu Jul 31, 2008 3:23 am
- Location: Chile
- Contact:
Re: How to know number of windows opened
Hi Rathi
very interesting and instructive your comment, thanks
Best regards,
Luis Vasquez.
very interesting and instructive your comment, thanks
Best regards,
Luis Vasquez.
- Alex Gustow
- Posts: 290
- Joined: Thu Dec 04, 2008 1:05 pm
- Location: Yekaterinburg, Russia
- Contact:
Re: How to know number of windows opened
Hi Rathi! Great! Thanks!