954,136 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

QBASIC under Windows XP

My QBASIC programs do not run under Windows XP. Specifically, LPRINT does nothing.
I have spent a lot of time & effort over the past 15 years programming in QBASIC with lots of useful and profitable programs. I really do not want to start over with Visual Basic unless there is a MIGRATION or CONVERSION or "CHEAT SHEET" comparing code. :(

peternrose
Newbie Poster
2 posts since Jul 2003
Reputation Points: 11
Solved Threads: 0
 

As far as I know, QBASIC is a pretty passee language. You might consider upgrading to Visual Basic due to the simplicity to create windows applications, in addition to the fact that it is completely object oriented. Good luck!

cscgal
The Queen of DaniWeb
Administrator
19,421 posts since Feb 2002
Reputation Points: 1,474
Solved Threads: 229
 

What's LPRINTs purpose? Does it swap the lpt ports or something?

Tekmaven
Software Architect
Moderator
1,274 posts since Feb 2002
Reputation Points: 322
Solved Threads: 28
 

In QBASIC, the PRINT statement prints to the screen while LPRINT prints to the printer.

cscgal
The Queen of DaniWeb
Administrator
19,421 posts since Feb 2002
Reputation Points: 1,474
Solved Threads: 229
 

XP will not run 16 bit applications to my knowledge without some type of emulation service running. I dont mean to judge you as a programmer but anyone who has spent so many years programming should have the logic behind programming in general well developed mentally. It is that logic that allows programmers to do what we do. A language is merely the extension and syntax we use to express this mentality. I would highly recommend not remaining binded to one language as it helps widen your horizons as a programmer to experiment in different languages. Good luck and I hope you find something that works for you.

odious face
Newbie Poster
17 posts since Jul 2003
Reputation Points: 10
Solved Threads: 1
 
As far as I know, QBASIC is a pretty passee language. You might consider upgrading to Visual Basic due to the simplicity to create windows applications, in addition to the fact that it is completely object oriented. Good luck!

VB is not COMPLETELY OOP.

Polymorphism is not implemented in VB.

:D

Shug
Newbie Poster
5 posts since Aug 2003
Reputation Points: 10
Solved Threads: 1
 

VB is not COMPLETELY OOP.

Polymorphism is not implemented in VB.

To put it bluntly - you are wrong. Polymorphism in VB.NET

You may have been thinking of an older version of VB, but VB.NET 7.0 (2002) and VB.NET 7.1 (2003) are 100% completely object oriented.

Sorry to break your heart - VB.NET is just as powerful as the next language.

Edit: I have now realized that the posted article is for "registered" readers only. If you want to find more about polymorphism in vb.net, google will give you a good 10,000+ results :-)

Tekmaven
Software Architect
Moderator
1,274 posts since Feb 2002
Reputation Points: 322
Solved Threads: 28
 

To get back on topic, there's a post located here that might be of some help:

[thread]798[/thread]

cscgal
The Queen of DaniWeb
Administrator
19,421 posts since Feb 2002
Reputation Points: 1,474
Solved Threads: 229
 

I learnt Qbasic when I took my gcse O levels under the University Of London and for IT I had to learn Qbasic.I think Qbasic is very easy and a basic type of langauge matured ppl don'treally need that at all.

camelNotation
Posting Whiz in Training
208 posts since Sep 2003
Reputation Points: 16
Solved Threads: 2
 
I really do not want to start over with Visual Basic unless there is a MIGRATION or CONVERSION or "CHEAT SHEET" comparing code.

I started out using GW-BASIC in 1986 and moved on to QBasic. The transition from QBasic to Visual Basic, in 1997, was painless as the only thing needing to be learned was dealing with forms. I think the transition to VB, which Microsoft offers a free version (control creation edition), should be relatively painless.

phickman7872
Newbie Poster
6 posts since Oct 2003
Reputation Points: 10
Solved Threads: 0
 
Polymorphism is not implemented in VB

Actually that statement is not true. Polymorphism, meaning "the same function/routine taking many names",:

Public Function (myInt As Integer, Optional myString As String = "")

Using the optional keyword, VB is able to use the same function for several different types of tasks. This is true with VB5 and VB6 (I don't know about earlier version of VB).

phickman7872
Newbie Poster
6 posts since Oct 2003
Reputation Points: 10
Solved Threads: 0
 
Public Function (myInt As Integer, Optional myString As String = "")


That really doesn't show an example of anything. Secondly, your sytax is invalid - what is return type of the function? Heh. Next time, make sure your example compiles ;-).

Tekmaven
Software Architect
Moderator
1,274 posts since Feb 2002
Reputation Points: 322
Solved Threads: 28
 

DOS-Programme unter Windows XP


Qbasic unter Windows XP


Hartnkig ht sich der Standpunkt, dass DOS-Programme unter Windows XP nicht laufen. Jedoch ist der Unterschied zu freren Windows-Versionen nicht sehr gro so dass Sie MS-DOS-Programm durchaus zur Arbeit bewegen knen. Falls die Standardeinstellungen nicht richtig funktionieren, knen Sie die Einstellungen er das Dialogfeld "Eigenschaften" der ausfrbaren Datei anpassen.

Im Gegensatz zu Windows 9x-Betriebssystemen entht Windows XP jedoch keine Real-Mode-MS-DOS-Umgebung, da es nicht auf dem MS-DOS-Kern basiert.

Wenn Sie auf die ausfrbare Datei f ein DOS-Programm doppelklicken, f das keine besonderen Eigenschaften bestimmt wurden, verwendet es die Datei "_default.pif", die sich im Windows-Verzeichnis Ihrer Festplatte befindet, normalerweise also C:\Windows.

Eine PIF-Datei (PIF = Programminformationsdatei) ist die Verknfung f ein DOS-Programm, mit dem eine passende Umgebung eingerichtet wird, in dem es laufen kann. Passen Sie nun die Eigenschaften eines DOS-Programms an, so verdern Sie lediglich die PIF-Datei und nicht die der ausfrbaren Datei einer Anwendung.


So msen Sie vorgehen

Um festzulegen, dass vor dem Start des Programms eine Autoexec.bat- und eine Config.sys-Datei ausgefrt werden soll, klicken Sie auf der Registerkarte "Programm" auf die Schaltflhe "Erweitert", und geben Sie dann in den Textfeldern die Pfade zu den entsprechenden Dateien ein. Standardmig verwenden alle Programme Autoexec.nt und Config.nt, die sich beide im Ordner %SystemRoot%\System32 befinden. Um die Grundeinstellungen f alle MS-DOS-Anwendungen zu dern, knen Sie diese Dateien mit einem Texteditor bearbeiten.

Mhten Sie, dass die Anwendung auch dann weiterlft, wenn sie sich nicht im Vordergrund befindet, dann msen Sie im Register "Sonstiges" bei dem Eintrag "Hintergrund" die Option "Immer Aussetzen" aktivieren.

Falls das Programm eine Tastenkombination von Windows verwendet, hat Windows Vorrang, und Sie werden diese Tastenkombination in der Anwendung nicht benutzen knen. Soll Ihre Anwendung bei einer bestimmten Tastenkombination Vorrang erhalten, so entfernen Sie auf der Registerkarte "Sonstiges" unter "Zugriffstasten von Windows" den Haken vor aus dem entsprechenden Kontrollktchen der vor Tastenkombination.

Zeitweise stzen Programme ab, sobald sich der Windows-Bildschirmschoner einschaltet. Um das zu umgehen, deaktivierten Sie im Register "Sonstiges" unter "Vordergrund" den Eintrag "Bildschirmschoner zulassen".

Obwohl f MS-DOS kein wirklicher Kompatibilitsmodus existiert, entht, finden Sie ein Register "Kompatibilit". Als nzlich erweist sich das, wenn ein DOS-Programm unter Windows 9x gut arbeitete, unter Windows XP jedoch nicht.

Im Register "Speicher" knen Sie der Anwendung eine bestimmte Menge verschiedener Speicherarten zuweisen, beispielsweise konventionell, XMS, EMS. Hfig kontrollieren DOS-Programme wrend des Starts die Speicherkapazit um die Arbeitsfigkeit sicherzustellen. Da Windows XP aber jedem Programm den Speicherplatz je nach Bedarf zuweist, kann die Zuteilung einer bestimmten Speichermenge f das Funktionieren des jeweiligen Programms sorgen.

Ronpasco
Newbie Poster
1 post since Oct 2003
Reputation Points: 10
Solved Threads: 0
 

Umm, english please? This might be a very informative post but we have no way of knowing.

cscgal
The Queen of DaniWeb
Administrator
19,421 posts since Feb 2002
Reputation Points: 1,474
Solved Threads: 229
 
Umm, english please? This might be a very informative post but we have no way of knowing.

UMM,WHAT HE SAID WAS
QUOTE: DOS-Programme unter Windows XP
Translation
DOS-Programs under Windows XP


Qbasic unter Windows XP


The point of view keeps itself persistent that DOS programs do not run under Windows XP. However the difference to earlier Windows versions is not very large, so that you can quite induce MSDOS program to the work. If the standard attitudes do not function correctly, you can adapt the attitudes over the dialog field "characteristics" to the executable file.

Contrary to Windows 9x-Betriebssystemen Windows XP contains however no material modem DOS environment, since it is not based on the MSDOS core. If on the executable file for a DOS program doubleclicked you, for which no special characteristics were intended, it uses the file "_ default.pif", which is in the Windows listing of your non removable disk, normally thus C:\Windows. A PIF file (PIF = program information file) is the linkage for a DOS program, with which a suitable environment is furnished, in which it run can. If you adapt now the characteristics of a DOS program, then you change only the PIF file and not those the executable file of an application.So you must proceed In order to specify that before the start of the program an auto-EXEC asking and a Config.sys file are to be implemented, it clicks you on register register "program" on the switching surface "extended", and enters you then in the text fields the paths to the appropriate files.

According to standard all programs use Autoexec.nt and Config.nt, which are both in the file %SystemRoot%\System32. In order to change the basic adjustments for all applications of MSDOS, you can work on these files with a text editor. If you would like that application keeps running also if it is not in the foreground, then you must always activate "the option" in register "other" with the entry "background suspending". If the program uses a combination of keys of Windows, Windows has priority, and you will not be able to use this combination of keys in application. If your application is to receive priority with a certain combination of keys, then you remove on the register map "other" under "access keys from Windows" for the hooks forwards from the appropriate control small box before combination of keys. Occasionally programs fall, as soon as the Windows Bildschirmschoner switches itself on. In order to go around, you deactivated in register "other" under "foreground" the entry "Bildschirmschoner permit".

Although for MS-DOS no real compatibility mode exists, finds you a register "compatibility" contains. When useful that proves, if a DOS program under Windows 9x worked well, under Windows XP however not. In the register "memory" can assign you to application a certain quantity of different storage types, for example conventionally, XMS, EMS. Frequently DOS programs control the storage capacity during the start around ability to work to guarantee. Since Windows XP assigns however the storage location to each program depending upon need, the dispatching of a certain memory quantity can provide for functioning the respective program.QUOTE:

"DEUTSCHE WELLE"
Translation
"GERMAN WAVE"
Let me know if BIG B services are needed again.

:BIG"B"AfflecK

)BIG"B"Affleck
Master Poster
Banned
766 posts since Oct 2003
Reputation Points: 25
Solved Threads: 8
 

Altavista Babelfish translation:

The point of view keeps itself persistent that DOS programs do not run under Windows XP. However the difference to earlier Windows versions is not very large, so that you can quite induce MSDOS program to the work. If the standard attitudes do not function correctly, you can adapt the attitudes over the dialog field "characteristics" to the executable file. Contrary to Windows 9x-Betriebssystemen Windows XP contains however no material modem DOS environment, since it is not based on the MSDOS core. If on the executable file for a DOS program doubleclicked you, for which no special characteristics were intended, it uses the file "_ default.pif", which is in the Windows listing of your non removable disk, normally thus C:\Windows. A PIF file (PIF = program information file) is the linkage for a DOS program, with which a suitable environment is furnished, in which it run can. If you adapt now the characteristics of a DOS program, then you change only the PIF file and not those the executable file of an application. So you must proceed In order to specify that before the start of the program an auto-EXEC asking and a Config.sys file are to be implemented, it clicks you on register register "program" on the switching surface "extended", and enters you then in the text fields the paths to the appropriate files. According to standard all programs use Autoexec.nt and Config.nt, which are both in the file %SystemRoot%\System32. In order to change the basic adjustments for all applications of MSDOS, you can work on these files with a text editor. If you would like that application keeps running also if it is not in the foreground, then you must always activate "the option" in register "other" with the entry "background suspending". If the program uses a combination of keys of Windows, Windows has priority, and you will not be able to use this combination of keys in application. If your application is to receive priority with a certain combination of keys, then you remove on the register map "other" under "access keys from Windows" for the hooks forwards from the appropriate control small box before combination of keys. Occasionally programs fall, as soon as the Windows Bildschirmschoner switches itself on. In order to go around, you deactivated in register "other" under "foreground" the entry "Bildschirmschoner permit". Although for MS-DOS no real compatibility mode exists, finds you a register "compatibility" contains. When useful that proves, if a DOS program under Windows 9x worked well, under Windows XP however not. In the register "memory" can assign you to application a certain quantity of different storage types, for example conventionally, XMS, EMS. Frequently DOS programs control the storage capacity during the start around ability to work to guarantee. Since Windows XP assigns however the storage location to each program depending upon need, the dispatching of a certain memory quantity can provide for functioning the respective program.

Cool, huh. Now write your reply, and then use babelfish to translate to german!
Totally off subject, though fun to do... Anyway, I too migrated from MS-Dos-based Basic programming. I still use PowerBasic 3 from time to time, but emulation is probably the only way to go. Time to learn VB, man. :(

Landline
Newbie Poster
2 posts since Nov 2003
Reputation Points: 10
Solved Threads: 0
 

Drat. Somebody beat me.

Landline
Newbie Poster
2 posts since Nov 2003
Reputation Points: 10
Solved Threads: 0
 

Contrary to popular belief QBasic will run on any Microsoft OS after DOS 5.0.
Including Win. XP.
Maybe this guy had his printer attached to a USB Port.
When using LPRINT you must have your printer attached to the Parallel Port.

OldBasicGuy
Newbie Poster
3 posts since Nov 2003
Reputation Points: 10
Solved Threads: 0
 
My QBASIC programs do not run under Windows XP. Specifically, LPRINT does nothing. I have spent a lot of time & effort over the past 15 years programming in QBASIC with lots of useful and profitable programs. I really do not want to start over with Visual Basic unless there is a MIGRATION or CONVERSION or "CHEAT SHEET" comparing code. :(


I have the same problem.
Have you or anyone else found a solution?

Peter

petermauro
Newbie Poster
3 posts since Mar 2004
Reputation Points: 10
Solved Threads: 0
 
Contrary to popular belief QBasic will run on any Microsoft OS after DOS 5.0. Including Win. XP. Maybe this guy had his printer attached to a USB Port. When using LPRINT you must have your printer attached to the Parallel Port.


I have the printer plugged in to the parallel port, and I can print to it
with windows programs. It is connected to the LP1 port in the windows menu.
But, when I try to LPRINT in QBASIC , nothing happens.

Please help!

petermauro
Newbie Poster
3 posts since Mar 2004
Reputation Points: 10
Solved Threads: 0
 

This article has been dead for over three months

Post: Markdown Syntax: Formatting Help
You