Re: Windows 7 + VFP9 speed problem

Author: <kamcginnis@gmail.com>

Posted: 2011-03-03 at 17:23:07

Has anyone mentioned defragging the hard drive? I have seen that make a big difference. (maybe not 80 times though)

----- Original Message -----

From: "Sytze de Boer" <sytze.kiss@gmail.com>

To: "profox" <profox@leafe.com>

Sent: Thursday, March 03, 2011 1:45 PM

Subject: Re: Windows 7 + VFP9 speed problem

What other files are necessary to run VFP9.exe, in order to run vfp9.exe

Myapp

On Fri, Mar 4, 2011 at 10:42 AM, Mike Copeland <mlcopeland@gmail.com> wrote:

> Done. Thanks Mike!

>

> As I said in another response, I have used this in all my Windows VFP

> apps for many years...it was already in the application I'm having speed

> issues with...I re-enabled it and unfortunately it didn't help.

>

> ****************************************

> func SetMem

> * Requests free RAM memory value from Windows, sets VFP to only utilize

> that amount.

> * Prevents slow performance for users who run many apps at the same time.

> * Keep with CHARTOBIN function below!!

> LOCAL lnAvailableMem, lpMemoryStatus, lnPct

> DECLARE GlobalMemoryStatus IN Win32API STRING @lpMemoryStatus

> lpMemoryStatus = REPLICATE(CHR(0), 32)

> GlobalMemoryStatus(@lpMemoryStatus)

> lnAvailableMem = CharToBin(SUBSTR(lpMemoryStatus, 13, 4))

> * Fine tuning option. Specify a decimal value to allocate less than

> 100%

> * i.e. .5 would be 50%

> *!* lnPct = 1

> *!* IF TYPE("main.nSetMemoryPct") == "N"

> *!* lnPct = goApp.nSetMemoryPct

> *!* ENDIF

> *!* lnAvailableMem = (lnAvailableMem * lnPct)

> SYS(3050, 1, lnAvailableMem)

> SYS(3050, 2, (lnAvailableMem/2) )

> RETURN lnAvailableMem

> *********************************************

> func CharToBin

> param tcWord

> * only called by SETMEM()

> LOCAL lnChar, lnWord

> lnWord = 0

> FOR lnChar = 1 TO LEN(tcWord)

> lnWord = lnWord + (ASC(SUBSTR(tcWord, lnChar, 1)) * (2 ^ (8 *

> (lnChar - 1))))

> ENDFOR

> RETURN lnWord

> *********************************************

>

> I'm pretty sure that's the one.

>

> Mike

>

> > On 3/3/2011 10:55 AM, Tracy Pearson wrote:

> >> I wonder if this much memory ends up swapping.

> >> This might be a good reason to change the SYS(3050) settings.

> >> Perhaps your Config.fpw might need the old MEMLIMIT, which may not work

> in

> >> VFP 9 at all

> >

> > Use Ed Leafe's Setmemory.prg. It's in the Downloads section on ProFox.

> >

>

[excessive quoting removed by server]

_______________________________________________

Post Messages to: ProFox@leafe.com

Subscription Maintenance: http://leafe.com/mailman/listinfo/profox

OT-free version of this list: http://leafe.com/mailman/listinfo/profoxtech

Searchable Archive: http://leafe.com/archives/search/profox

This message: http://leafe.com/archives/byMID/profox/0e0001cbd9f1$944a3cb0$7a00a8c0@w2k3s02

** All postings, unless explicitly stated otherwise, are the opinions of the author, and do not constitute legal or medical advice. This statement is added to the messages for those lawyers who are too stupid to see the obvious.

©2011 <kamcginnis@gmail.com>