FASTER THAN VB

I converted an app I originally wrote in VB to PowerBASIC for Windows. The program is used by our sales staff, and uses COM to create or update Excel worksheets with information extracted from our legacy production control program.

I used to email the zipped VB install package to a salesperson, then walk them through the install process. That only took an hour or so. Now I email a 35k exe and tell them to save it to their hard drive. The hardest part is is telling them how to create a shortcut on their desktop.

And it runs 80% faster than the VB app. And it doesn't crash.

I must also add that I got fantastic help from PowerBASIC Tech Support here on the forum as I learned how to convert my app from VB to PowerBASIC. And untold assistance from numerous people here on the forum. Thanks to all of you.

- Jim Robinson

Frequently Asked Questions

Will my DOS-based BASIC source code compile with either of your Windows-based BASIC compilers?

If you are using TurboBASIC, PDS Basic, GW-BASIC, QuickBasic, or PB/DOS there is no easier path to Windows than PowerBASIC!

Your functional code (conditions, assignments, file handling, etc.) will port over with little to no change, depending on what BASIC you are converting from. Code dealing with devices and user interaction will need to be rethought and re-written because DOS and Windows are two different operating systems. You'll need to make changes to your code to give your program the look and feel of Windows.


How much work is it to convert my DOS-based programs to Windows?

A large part of this answer depends on the complexity of the program and the skill of the programmer that does the conversion. While we can't estimate the "work", we can explain the things that must be done by the programmer.

We make two compilers for Windows - PowerBASIC for Windows (PB/Win) and PowerBASIC Console Compiler (PB/CC). Each one has its own requirements that your DOS-based source code must meet.

Let's look at PowerBASIC for Windows first.

This is the crown jewel to aim for. PowerBASIC for Windows let's you create applications with that look and feel Windows applications have. Your program will have buttons, menus, scroll bars - all the elements you see in modern professional applications! These are not in your DOS-based programs, so clearly you'll need to write the source code that enables them. Under Windows you do not have direct control of devices, and interaction with the user must be done the way Windows wants you to do it. For example, when running a Windows application you'll notice there is no prompt line. User input is done by presenting a dialog window with edit fields in it, typically with an OK and Cancel button. This means that any DOS code like LINE INPUT is not going to work. You will need to create a dialog window with the edit fields and buttons and statements to tell your program how to respond to them. (See PowerBASIC Forms - it's a great tool for creating user interfaces).

PB/Win details


With our other compiler for Windows, the PowerBASIC Console Compiler, you create true 32-bit Windows applications that run in the console window (some say "DOS box"). These text-only programs look and feel like DOS applications but run with 32-bit speed - and you have access to gigabytes of memory!

Conversion from DOS-based BASIC to PB/CC is much easier than to PB/Win. You'll need to make some changes but you won't need to rewrite your interface. The PB/CC manual is on-line (http://www.powerbasic.com/support/help/pbcc/). In the Programming Reference section is a topic "Upgrading to PBCC" which spells out the differences between DOS and Windows BASIC.

PB/CC details


Lots of our customers have done these conversions. Many of them are members of our web site-based Forums. The PowerBASIC Peer Support Forums consist of over 200,000 searchable posts!

tip: have a look at actual PB/Win and PB/CC source code by visiting our Downloads area.

In summary, while no product can simply recompile your DOS source code and produce Windows applications, there is no easier path to Windows than PowerBASIC!

Return to FAQ