Hi,
I am using a menu designer created menu to navigate through my forms.
ie
File
Form1
Form2
Form3
I open the selected form using 'Do Form' and then use the following code to close any other open forms. This works fine until I put scrollbars on my forms. It seems as though VFP6 is treating scrollbars as another form and closes them too - which closes the form I just opened. Can anyone suggest other code or a fix to mine to avoid this issue.
I only want one form open at a time.
Thanks in advance for any help.
x = _SCREEN.FORMCOUNT
DO WHILE _SCREEN.FORMCOUNT > 1
x = _SCREEN.FORMCOUNT
IF _SCREEN.FORMS(x).NAME <> TMPFORM &&tmpform = form just opened
_SCREEN.FORMS(x).RELEASE
x =_SCREEN.FORMCOUNT - 1
ENDIF
ENDDO
I am using a menu designer created menu to navigate through my forms.
ie
File
Form1
Form2
Form3
I open the selected form using 'Do Form' and then use the following code to close any other open forms. This works fine until I put scrollbars on my forms. It seems as though VFP6 is treating scrollbars as another form and closes them too - which closes the form I just opened. Can anyone suggest other code or a fix to mine to avoid this issue.
I only want one form open at a time.
Thanks in advance for any help.
x = _SCREEN.FORMCOUNT
DO WHILE _SCREEN.FORMCOUNT > 1
x = _SCREEN.FORMCOUNT
IF _SCREEN.FORMS(x).NAME <> TMPFORM &&tmpform = form just opened
_SCREEN.FORMS(x).RELEASE
x =_SCREEN.FORMCOUNT - 1
ENDIF
ENDDO