Classic MSDOS QBasic Play Functionality

Just a question of general information and out of own interest.

In Classic MSDOS based QBasic, QuickBasic versions (not Microsoft Visual Basic on Windows), we had commands like

Beep, sound and Play

Play can also have programmatic abilities like playing musical notes.

I was trying to find out if this feature was available as some library or wrapper fro C# or VB.NET too.

LVL 15
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

It seems there are no direct equivalents to these old features (I remember using them, too... and even more primitive ones prior to QBasic).  According to the following links and message threads, most people are either using PInvoke to run old code or are using the DirectX SDK to get similar functionality from their .Net apps.

deepaknetAuthor Commented:

Yep. Some of the features are not fully available in our framework. But I found one way which may not be fully right but I think would try to address and use the services of QBasic.exe.

(1) Since .NET framework supports embedded assemblies in resource files, can we have QBasic.EXE itself compressed (and possibly encrypted) and stored as an embedded resource file. Our application can runtime unpack this, pass the commandline arguments and invoke the same. I guess, QBasic also supports commandline option of executing BAS files without invoking the GUI. I need to make a research on this and perhaps this weekend.

(2) If we go about the step1, we can utilise the services of QBasic.exe itself. But the following points must be addressed:

       (a) Is QBasic.exe has redistributable license? Since our .NET applications are under Windows 98 or higher and QBasic.exe is pure MSDOS program, we need to think from this perspective also right?
       (b) Again seeing from the perspective of 2a, how about the performance analysis? .NET to COM itself will have a lot of performance analysis to be done and now this involves consuming of a pure MSDOS application.

(3) Any other points that we need to consider.

But I think this would also achieve a bit of feature reuse, at least from the perspective of learning things. What do you say?
I suspect the license issue might be the biggest non-technical issue.

One other problem that may arise... at the time that QBasic was popular it was fairly common in software to calculate short times (such as would be involved in note duration and rest duration) by software loops.  Now that processor speeds are so much faster, this might result in totally unusable sound being produced.

Also, not all the functionality of MSDOS has been "virtualized" in Window's command shell... these old programs may not even have any effect on the PC speaker.

I can see you've put a lot of thought into this.  Are yo planning on pursuing it?  Seems it could require a lot of time... something I'm not blessed with right now... trying to get my head around a very complex project that needs high-speed and high-volume data entry processing and the customer insists on using an intranet based solution.


Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
deepaknetAuthor Commented:

Thanks for the pointer.
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Programming Languages-Other

From novice to tech pro — start learning today.