Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to run FPD on Windows XP computers

FoxPro Enviroment

How to run FPD on Windows XP computers

by  rob444  Posted    (Edited  )
Foxpro DOS running on XP driven modern computers:

Always run the extended version of the IDE and FPD compiled programs.
Run those programs directly, not using the FOX startup program.
Do not install the not-extended runtime on windows XP systems.



What problems to expect:

Problem 1:
The processors of modern computers are too fast for the original FPD to run on them.
Most of the time you'll get a divide by zero error or something like that.


Solution :
Apply a patch (DZPatch or Patch26)
http://www.davesummers.net/foxprolinks.htm
[color red]Note that these patches are primarily for FPW, not for FPD![/color]
Have a look at the Microsoft Knowledge Centre
http://support.microsoft.com/default.aspx?scid=kb;EN-US;Q240982
Personally I cannot remember ever having problems with FPD on faster CPU's...

Problem 2:
The FPD DOS application seems to freeze or uses way too much system resources

Solution :
FP 2.0, FPD 2.5b or FPD 2.6a all run fine under XP SP2 (and XP and XP SP1) using TameDos or DOSIdle.
http://www.tamedos.com/
TameDos is the best solution for the problem
DOSIdle - (free) http://www.softlookup.com/download.asp?ID=9198
DOSIdle slows down the CPU usage when a dos application is about idle, this does not stop the almost 99% cpu usage when the dos application isn't idle.

Problem 3:
Too few filehandles in XP

Solution:
Put the FILES=xxx command in \WINDOWS\SYSTEM32\CONFIG.NT where xxx is the number of files you need.

Problem 4:
Printing is slow/delayed on XP machines and sometimes does not complete.

Solution:
Use the registry editor:
(Start -> Run and type REGEDIT)
Follow the tree given below and reach the LPT_TimeOut value
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\WOW\LPT_Timeout
Double click this key LPT_TimeOut key
A prompt for a string with a default of "15" (seconds) will appear. Change this to 1 or 2 and click OK.
Close Regedit
Repeat these steps for every computer running Windows XP/Windows2000, including the data server, and all remote workstations.

Problem 5:
FPD's own clock can show some strange behaviour and wastes too much system resources

Solution:
The best solution is NOT to use the FPD clock.
Tamedos might solve a little of the system resources problem but the behaviour of the clock might still be irratic.
Also see problem nr 5.

Problem 6:
Time() doesn't give the correct time.

Solution:
If for your application the correct time() result is critical issue a
RUN cmd.exe /C time /t
in the program code just before you call the time() function.
This ensures that FPD "sees" the right time again.

Problem 7:
FPD cannot print to USB connected printers.

Solution:
I have found PrintFile available as free download in the following link... working excellent.
http://www.lerup.com/printfile/
Read the readMe file provided with it. You can set the command line options.. to use that as an automatic print spooler. Any file put in the specified spooler directory will be picked up and printed by the PrintFile.
So what I did, is to check for a Variable in my programme and use the spooler if opted... example...
Code:
IF lUsePfile
   myTxt = "C:\mySpoolDir\"+sys(3)+".txt"
   REPORT FORM myReport NOEJECT TO FILE (myTxt) 
ELSE
   REPORT FORM myReport NOEJECT TO PRINT
ENDIF
PrintFile will print the text file and then delete it as well.
In the above example I setup the spooler to take the default as .txt.... while its default is .ps
You can manipulate all these suitably. You can even print in Landscape with two pages in a single A4.
This way you can use any USB printer and Windows printer in FPD!

Problem 8:
FPD IDE and FPD programs do not run full screen on windows XP.

Solution:
Use the correct settings of the desktop link to those programs.
screen tab -> select full screen
screen tab -> fast ROM emulation selected
screen tab -> dynamic memory.. selected
memory tab -> conventional memory automatic
memory tab -> expanded memory none
memory tab -> extended memory none uses HMA selected
memory tab -> memory for MS DOS DPMI automatic

Register to rate this FAQ  : BAD 1 2 3 4 5 6 7 8 9 10 GOOD
Please Note: 1 is Bad, 10 is Good :-)

Part and Inventory Search

Back
Top