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 wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to terminate an Inactive Foxpro Run Command?

Status
Not open for further replies.

softlink

Programmer
May 29, 2003
5
US
Platform is FoxProW 2.6 on Win2K or WinXp.
Need to send a text file to COM1 to print a barcode.
Executing
! Cmd/c copy filename COM1 && Win2K
or
! copy filename COM1 && WinXp

Command window pops up to execute the COPY but stays
there until the close box of the command window is selected, control returns to the foxpro application.

I have been using this command up to Win Me with the command window closing without user assistance after execution. Control returns to the foxpro application automatically.
Is there a way to close the command window in Win 2K
or Win Xp without the users help?
 
COM1 is a DOS port and since NT/2000/XP/2003 aren't based on DOS, it isn't valid. If you need to do it this way, you'll need to go back to Win98. Another alternative would be to create a VFP app that uses the MSCOMM32 control to write to a serial port.

You might be able to map a printer to the COM port and use the Generic / Text Only printer driver to "print" the file.

Rick
 
You also need to change your FOXRUN.PIF file, located in the Foxpro stratupfolder. (Right-click->Properties)
Select the 'Program' tab and make sure the 'Close on exit' check box is checked.


-Dave Summers-
[cheers]
Even more Fox stuff at:
 
Rick and Dave,
Thank you very much for the help.
I solved the problem on Win2000 as follows:
I copied the FoxRun.pif to the working directory of the
application. Per Dave's suggestion checked the 'Close on exit' check box and changed the command to print the label
to:
! Cmd/c copy filename COM1
The MsDos box pops up, performs the copy and disappears.
Kevork
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top