Question: A number of years ago I wrote a business application in the Microsoft BASIC Professional Development Systems that runs compiled in a DOS environment. It relies on sending control code sequences to the printer for proper page formatting. Only a handful of codes are used. The application is still in service, but now the user's computers all run Windows (probably various versions). The legacy BASIC program is run in a DOS window, but nothing comes out of the printer any more. How can this be remedied? Thank you.
Answer: There are three differences between DOS and Windows.
For your program to be able to access the Printer it will need to be amended to call the Windows API to request for Windows to pass the information to the printer. Windows will then print what is requested at a time that doesn't conflict with it printing something else.
Follow-on Question: Thanks for the explanation. That enables me to appreciate the problem. Do you have a recommendation of software or documentation that will explain how my application can communicate with the Windows API?
Answer: To get your program to run on Windows with access to the printer you will probably need to obtain a new compiler that supports Windows and rewrite the code to work with that. The new compiler should come with the necessary documentation on how to call the Windows API.
This article written by Stephen Chapman, Felgall Pty Ltd.