vfp7 form.release or release window? 
Author Message
 vfp7 form.release or release window?

I'm having trouble getting rid of forms when the user
leaves them open and tries to exit the system. I was
looping round by doing DO WHILE !EMPTY(WONTOP()) and
within this RELEASE WINDOW (WONTOP()) but this
intermittently fails and goes into an endless loop. I
would like to say formname.release but for some reason I
don't have access to formname. properties even though the
form has a name. The form properties are not accessable in
the debug window either which is annoying as I have to
type _screen.activeform all the time.

Any ideas?



Mon, 12 Sep 2005 19:42:45 GMT  
 vfp7 form.release or release window?
Hello, Bernie!
You wrote  on Thu, 27 Mar 2003 03:42:45 -0800:

 BB> I'm having trouble getting rid of forms when the user
 BB> leaves them open and tries to exit the system. I was
 BB> looping round by doing DO WHILE !EMPTY(WONTOP()) and
 BB> within this RELEASE WINDOW (WONTOP()) but this
 BB> intermittently fails and goes into an endless loop. I
 BB> would like to say formname.release but for some reason I
 BB> don't have access to formname. properties even though the
 BB> form has a name. The form properties are not accessable in
 BB> the debug window either which is annoying as I have to
 BB> type _screen.activeform all the time.

 BB> Any ideas?

There are several ways to accomplish this. Three samples:

- 1st (in the form)
thisform.release()

- 2nd
DO FORM yourform NAME frmYourFormName
frmYourFormName.release()

- 3rd
FOR EACH loForm IN _screen.forms
    IF loForm.name = "yourname"
        loForm.release
        EXIT
    ENDIF
ENDFOR
---
Eric den Doop
www.foxite.com - The Home Of The Visual FoxPro Experts - Powered By VFP8



Mon, 12 Sep 2005 20:30:34 GMT  
 vfp7 form.release or release window?
Thanks Eric - the last example works a treat.

Can you think of any reason I can't see form properties in
the debug window e.g myform.name?

Quote:
>-----Original Message-----
>Hello, Bernie!
>You wrote  on Thu, 27 Mar 2003 03:42:45 -0800:

> BB> I'm having trouble getting rid of forms when the user
> BB> leaves them open and tries to exit the system. I was
> BB> looping round by doing DO WHILE !EMPTY(WONTOP()) and
> BB> within this RELEASE WINDOW (WONTOP()) but this
> BB> intermittently fails and goes into an endless loop. I
> BB> would like to say formname.release but for some
reason I
> BB> don't have access to formname. properties even
though the
> BB> form has a name. The form properties are not
accessable in
> BB> the debug window either which is annoying as I have
to
> BB> type _screen.activeform all the time.

> BB> Any ideas?

>There are several ways to accomplish this. Three samples:

>- 1st (in the form)
>thisform.release()

>- 2nd
>DO FORM yourform NAME frmYourFormName
>frmYourFormName.release()

>- 3rd
>FOR EACH loForm IN _screen.forms
>    IF loForm.name = "yourname"
>        loForm.release
>        EXIT
>    ENDIF
>ENDFOR
>---
>Eric den Doop
>www.foxite.com - The Home Of The Visual FoxPro Experts -
Powered By VFP8

>.



Mon, 12 Sep 2005 21:17:25 GMT  
 vfp7 form.release or release window?
Hello, Bernie!
You wrote  on Thu, 27 Mar 2003 05:17:25 -0800:

 BB> Can you think of any reason I can't see form properties in
 BB> the debug window e.g myform.name?

The only reason I know is that the myform variable does not exist. What does
TYPE("myform") return in the de{*filter*} window?
---
Eric den Doop
www.foxite.com - The Home Of The Visual FoxPro Experts - Powered By VFP8



Mon, 12 Sep 2005 21:37:41 GMT  
 vfp7 form.release or release window?
Yes - this does return "U". Still don't know why.

Sorry about the delay in replying - I'm in Scotland and
the time difference means I'm posting messages in the wee
hours of the morning in US!

Quote:
>-----Original Message-----
>Hello, Bernie!
>You wrote  on Thu, 27 Mar 2003 05:17:25 -0800:

> BB> Can you think of any reason I can't see form
properties in
> BB> the debug window e.g myform.name?

>The only reason I know is that the myform variable does

not exist. What does
Quote:
>TYPE("myform") return in the de{*filter*} window?
>---
>Eric den Doop
>www.foxite.com - The Home Of The Visual FoxPro Experts -
Powered By VFP8

>.



Tue, 13 Sep 2005 21:58:40 GMT  
 vfp7 form.release or release window?
Hello, Bernie!
You wrote  on Fri, 28 Mar 2003 05:58:40 -0800:

 BB> Yes - this does return "U". Still don't know why.

That's because the variable "myform" does not exist. Try to run your form
this way:

DO FORM yourform NAME myform

You'll then be able to refer to "myform" in the de{*filter*} but also in your
code.

 BB> Sorry about the delay in replying - I'm in Scotland and
 BB> the time difference means I'm posting messages in the wee
 BB> hours of the morning in US!

No worries, I am in The Netherlands, so I have the same "delay".

---
Eric den Doop
www.foxite.com - The Home Of The Visual FoxPro Experts - Powered By VFP8



Tue, 13 Sep 2005 22:51:52 GMT  
 
 [ 6 post ] 

 Relevant Pages 

1. form.Release not releasing

2. RELEASE LIBRARY does not release memory

3. RELEASE THISFORM vs THISFORM.Release()

4. THISFORM.Release() .vs. RELEASE THISFORM

5. RELEASE THISFORM vs. THISFORM.Release()

6. ThisForm.Release isn't ThisForm.Releasing???

7. VFP7 Release date?

8. VFP7 QueryUnload fires at ThisForm.Release?

9. Poll:Will you release apps in VFP7.0?

10. Estimate on when VFP7 to be released?

11. Release form problem (after filling form property)

12. release form - from menubar of top level form ?

 

 
Powered by phpBB® Forum Software