![]() |
China DOS Union-- Unite DOS · Advance DOS · Grow DOS --Union site: www.cn-dos.net Forum site: www.cn-dos.net/forum |
| Guest | Log in | Register | Members | Search | China DOS Union |
|
中国DOS联盟论坛 The time now is 2026-10-31 10:50 |
47,815 topics / 349,930 posts / today 0 new / 48,290 members |
| DOS开发编程 & 发展交流 (开发室) » Help with QBasic running under Windows XP! |
| Printable Version 2,572 / 5 |
| Floor1 penggp | Posted 2008-07-18 07:02 |
| 新手上路 Posts 4 Credits 12 | |
|
The child has just started learning Qbasic, enters DOS, and runs Qbasic.exe normally. But after writing a program and executing run-start, some programs show a black screen after running, and some directly exit Qbasic without showing the running result. However, it runs normally on my office machine. Asking for help from all experts, thanks!!
My operating system is: Tomato Garden Windows XP Pro SP2 Activation-free V3.5 System information is as follows: OS Name Microsoft Windows XP Professional Version 5.1.2600 Service Pack 3 Build Number 2600 OS Manufacturer Microsoft Corporation System Name CFC598C0428A49F System Manufacturer To Be Filled By O.E.M. System Model MCP68 System Type X86-based PC Processor x86 Family 15 Model 107 Stepping 1 AuthenticAMD ~2094 Mhz BIOS Version/Date American Megatrends Inc. 080014, 2007-8-28 SMBIOS Version 2.5 Windows Directory C:\WINDOWS System Directory C:\WINDOWS\system32 Boot Device \Device\HarddiskVolume1 Region People's Republic of China Hardware Abstraction Layer Version = "5.1.2600.5512 (xpsp.080413-2111)" User Name CFC598C0428A49F\Administrator Time Zone China Standard Time Total Physical Memory 2,048.00 MB Available Physical Memory 1.24 GB Total Virtual Memory 2.00 GB Available Virtual Memory 1.96 GB Paging File Space 3.60 GB Page File C:\pagefile.sys |
|
| Floor2 ilbgh11 | Posted 2008-07-19 11:52 |
| 初级用户 Posts 21 Credits 60 | |
|
The LZ can write a Hello World program to run under XP, and surely the CMD window will flash and then disappear.
Solution: Add a pause statement in the place where you need to display the result (implemented with the getch() function in C language). I haven't been in touch with BASIC for a long time and have almost forgotten it. |
|
| Floor3 ilbgh11 | Posted 2008-07-19 11:55 |
| 初级用户 Posts 21 Credits 60 | |
|
If there is a black screen, check the settings of QBASIC. If QBASIC exits directly, modify your program code and don't let it trigger the protection mechanism of WINDOWS. Or change to another BASIC compiler. Personally, PowerBasic is recommended.
|
|
| Floor4 penggp | Posted 2008-07-20 00:31 |
| 新手上路 Posts 4 Credits 12 | |
|
Thanks to friend ilbgh11 for guidance!!! There's no way to change settings in Qbasic. It's estimated to be a setting issue in the operating system, and I don't know how to change it.
I installed a DosBox 0.72 on my computer and used it to virtualize the DOS environment, and the program runs normally. Further observation found that only those programs whose code uses screen, line, draw, play, etc. related to images and sounds don't produce results or are black screens, while other programs can still be executed. Asking everyone: How can I change the settings to completely solve this problem? Thanks! [ Last edited by penggp on 2008-7-20 at 12:38 AM ] |
|
| Floor5 SDOS | Posted 2008-07-26 23:17 |
| 新手上路 Posts 6 Credits 12 | |
|
Go find a "Camel" on the Linux platform. It's much better than this.
|
|
| Floor6 ilbgh11 | Posted 2008-07-27 15:39 |
| 初级用户 Posts 21 Credits 60 | |
|
You create a shortcut to QBASIC.EXE. In WINDOWS, the shortcut pointing to a DOS program is quite special (MS still takes care of the older programs). Right-click the shortcut icon you created, go to Properties, in the "Screen" tab, select "Full screen" in "Usage", and in the "Compatibility" tab, remove the checkmark in front of "Disable visual styles" in "Display settings". Apply and OK. Then double-click this shortcut to run QBASIC to make your settings take effect. Then run a program containing statements like screen, line draw, play, etc., and see if it works.
|
|
|
[ Contact the Union admin team -
中国DOS联盟 -
Standard version ] Sponsored by ifanr Inc | © 2001–2023 |