Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Screen resize code
Message
From
11/10/2006 09:29:36
 
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
01160765
Message ID:
01161168
Views:
13
>I have implemented screen resize code using http://fox.wikis.com/wc.dll?Wiki~ScreenResize
>
>Here is the code:
>
>
>_Screen.AddObject("oResizer", "Resizer")
>
>DEFINE CLASS Resizer AS Custom
>     oScreen = _Screen
>
>     PROCEDURE oScreen.Resize
>          WAIT window "Resizing" NOWAIT
>     ENDPROC
      
*--------------------------------------------
*  You can add a garbage collection method to your class       
*--------------------------------------------
      Procedure Destroy
        this.oScreen = .null.
      EndProc
*--------------------------------------------



>ENDDEFINE
>
>
>At the end of the program, this runs:
>
>If Vartype(_Screen.oResizer) = 'O'


* Add this to remove hanging reference
*---------------------------------------------
       _Screen.oResizer.oScreen  .Null.
*---------------------------------------------

>	_Screen.RemoveObject("oResizer")
>Endif
>
>
>It does run the RemoveObject line. However, if I BUILD the application again, it gives me this error:
>
>File cannot be closed because outstanding references exist.
>
>
>If I exit FoxPro, and restart, then BUILD works fine. Removing all the above, then BUILD works without a problem.
>
>Any idea what I can try to avoid the outstanding references error?
>
>Cyril

Glenn
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform