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

PIF file functionality

Status
Not open for further replies.

stackdump

Technical User
Sep 21, 2004
278
GB
Hi all,

I'm sorry if this is a basic question but I have a legacy DOS program on my system which is invoked using a PIF file (a shortcut). The shortcut has properties set for a given screen color, font size etc. I would really like to put that function into the executable, so I only have one file to circulate. The shortcut has the executable path embedded into it too and this always need changing on different computers.

So when the executable runs, I want it to pop up the console window and all the code runs inside that window. It would also be good if the window size color etc. could be configured.

Any ideas?

 
The size of the console window can only be controlled by editing the shortcut.

You can define console text and background colors if you use the TextColor(Color:byte) and TextBackground(Color:byte) procedure. These are in the crt unit.

However, when using the crt units on programs running on processors >200MHz you will encounter a "runtime error 200" due to internal initialization of the delay() procedure.

This can be fixed by applying a patch to your compiled .exe file. The patch can be found here:


Good Luck


Jakob
 

ok.

I saw that error 200 when I was trying out a few things, but assumed it was my bad coding :-( I'll give it a try with the patches.

Thanks.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top