Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Memory release.
Message
 
 
To
28/11/2000 09:02:35
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Title:
Miscellaneous
Thread ID:
00445826
Message ID:
00446165
Views:
9
Tony,

>Yes sometimes, it gets "Printer Driver not found error",

This is caused by the fact that VFP will embed the current printer driver name of the machine that last editted the report. There's a small chunk of code that should be used to remove the printer stuff from a report before it's deployed.

Here's what I use:

* reportfix.prg 05-Dec-97

* Takeout the Printer specific information from a report file

lparameter lcFile

if ( pcount() < 1 )
lcFile = getfile( "frx" )
if ( empty( lcFile ) )
return
endif
endif

i = at( '.', lcFile )
if ( i > 0 )
lcFile = left( lcFile, i-1 )
endif

lcFile = lcFile + ".frx"

use (lcFile)
replace Expr with DePrinter( Expr ), Tag with "", Tag2 with ""
use


function DePrinter( lcExpr )
local lcLine, lcRetVal

lcRetVal = ""

for i = 1 to memlines( lcExpr )
lcLine = mline( lcExpr, i )
do case
case "DEVICE=" $ lcLine
* strip it
case "PRINTQUALITY=" $ lcLine
* strip it
case "YRESOLUTION=" $ lcLine
* strip it
otherwise
lcRetVal = lcRetVal + lcLine + chr(13) + chr(10)
endcase
endfor

return lcRetVal


>but there is no video driver errors. My app has no hundreds but dozens of objects defined at a normal specific runtime, and I thought that by tracking down the memory use per form fired, I would be on the right track.
>Is it allright to keep the least memory use possible, to maintain the application healthy at all times?
df (was a 10 time MVP)

df FoxPro website
FoxPro Wiki site online, editable knowledgebase
Previous
Reply
Map
View

Click here to load this message in the networking platform