No announcement yet.

Old PowerBASIC 3.0 DOS Source Code

  • Filter
  • Time
  • Show
Clear All
new posts

  • Old PowerBASIC 3.0 DOS Source Code

    I did a lot of PowerBASIC programming back in the days
    before Windows came out. I saved the best of this.
    I was one of the pioneers in promoting computerization
    of the legal process.

    How would my old DOS version PB source code work in
    these new versions of PowerBASIC? How much work would
    it be to make a version that will run under Windows 95/98?


  • #2
    hi shari,

    firstly, preparation and learning windows gui programming techniques is the key to making the move from dos to windows. how much work is involved in the process will depend on the compiler you choose, what your dos code does, and how it was written.

    essentially, dos and gui-windows programming strategies are quite different, so getting to grips with a different approach to programming can take a bit of time to master, but if you arm yourself with a good windows programming reference book before hand, you'll find the learning-curve is much less steep than it may first seem. you can find a list of recommended titles at

    in a nutshell, windows gui applications work completely differently to dos applications, so all user-interface code in your dos app's will need to be rewritten. windows gui applications actually stop running until an "event" occurs (such as a mouse click, etc), whereas dos code typically sits in a loop waiting for keypresses (ie, the code runs all the time until the application ends). this is often referred to as "event-driven" versus "procedural" programming.

    so, other than user interface code, computational and file handling code will probably port across with little or no changes, as this type of code is very compatible with pb/dll code. graphics and serial comms code does need rewriting though.

    now, before you think the whole idea may be "too hard", let me tell you it is not impossible - in fact, it is far from impossible, but it may not always be easy either.

    with all that said, there is another path that you may wish to consider: the powerbasic console compiler (pb/cc).

    using pb/cc to create text-mode windows applications can be a *lot* less work when it comes to porting existing dos code to windows, since pb/cc supports typical dos statements such as print, locate, color, etc. moreso, it supports the "traditional" dos programming approach as i mentioned above.

    graphics and serial i/o code will still need rewriting, but most other forms of dos code will often work in pb/cc with only minor modification. really, it is hard to offer more specific advice unless we can review some of the dos code you wish to port to windows. you may want to consider posting one or two examples for peer review and ask for estimations on the amount of work required to port across.

    i hope this helps!

    btw, you'll find a overview of the powerbasic compiler range at and a keyword comparison table at

    powerbasic support
    mailto:[email protected][email protected]</a>
    mailto:[email protected]


    • #3

      Frankly, if you need a GUI program fast without the hassle of
      the Windows API stuff, check out EZ-GUI at .

      If you have a lot of screens in you DOS programs, EZ-GUI will be able
      to make the transition *very* easy.

      However, if you don't want to have a 3rd party DLL bundled with
      your application you can check out the DDT that comes with
      PowerBasic DLL compiler. Check out the FreeWare DDT version of
      EZ-GUI for easy creation of Dynamic Dialogs... or wait until
      EZ-GUI SDK for PowerBasic becomes available, which will produce
      100% SDK code.

      And to avoid that I'm biased about EZ-GUI - people may get the
      impression - you can also check out the FreeWare Designer from
      Ed Turner which produces SDK style code.


      So here we are, this is the end.
      But all that dies, is born again.
      - From The Ashes (In This Moment)