Qbasicnews.com

Full Version: I know, I must be stupid
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2 3 4 5
Alright, I've got my program working, and I swear I must be stupid for asking this but; I can't seem to get the .exe version of my file to work correctly. I have it in .bas and then attempt to make it an .exe so I can use it without Qbasic and when I attempt to open the new .exe the dos window opens, and then immediately closes without displaying or executing any part of the program.

Sorry for such a dumb question, thanks...

Anonymous

forgive me for being blunt, but the stupid thing is that you haven't posted source code. Wink
EclipseOTO:

It would interest me to know if, if you save it as an exe file that needs QBRUN.exe to run, will it now run, or, will it also open a screen and then close again?
um... where do i find the source code, and I can't seem to find "QBrun.exe" in my folders... :oops: sorry for being so uninformed!
The source code is in "[filename].bas" where [filename] is the name of your program- however, it may be in a faster, binary, QBasic format. If this is the case, you will need to go into the Save As dialog and make sure the "text" radiobutton is checked.
QBRun is brun45 in QB 4.5, by the way.
Skyler: Thanks for catching my error!

EclipseOTO: Please try again, using the correct name for the executable, which, as Skyler points out, is BRUN45.exe
Alright, forgive me, but im still not sure about any of this... the name of the file is SPWRITER.BAS. I've tried running this with Brun45 as well as saving the file as SPWRITER.EXE. Unfortunately I can't seem to figure out how to open the .exe version with Brun45... As well as this I can't find the '"text radiobutton" in the Save as dialog. Sorry, and thanks!
Skyler means, click on RUN, select Make Exe File, then select either "EXE Requiring BRUN45.EXE" or "Stand-Alone EXE File", then "Make EXE".

By the way, I have two BAS files in my QB directory. I can run both from within QuickBASIC 4.5, but, when I compiled them as stnd-alone exe files, one runs, the other exhibits the problem you are describing, a DOS screen appears for a second, then the program closes. The same thing happened when I compiled as "EXE Requiring BRUN45.EXE". So, I am now going to investigate this fenomenon further.
This is what I found, for my case.
I entered, as the final line:
Code:
WHILE INKEY$ = "":WEND
Now, my compiled program runs fine, either as a stand-alone or requiring BRUN45.exe.

The program was, apparently, running lightning fast and closing on terminating. By adding the one line of code above, it now stops, until one presses any key, then it terminates and closes.

Does the above fix your problem?
Quote:Skyler means, click on RUN, select Make Exe File, then select either "EXE Requiring BRUN45.EXE" or "Stand-Alone EXE File", then "Make EXE".

By the way, I have two BAS files in my QB directory. I can run both from within QuickBASIC 4.5, but, when I compiled them as stnd-alone exe files, one runs, the other exhibits the problem you are describing, a DOS screen appears for a second, then the program closes. The same thing happened when I compiled as "EXE Requiring BRUN45.EXE". So, I am now going to investigate this fenomenon further.
Don't use the compile option "EXE Requiring BRUN45.EXE". Don't waste your time with it. Use the "Standalone EXE" option.

Years ago, when your application had many programs, the BRUN45.EXE option created smaller EXE files but needed the BRUN45 to run. Nowadays, the saving in program EXE space is negligible, and this BRUN45 option is virtually obsolete.

Standalone EXE programs are always better.
*****
Pages: 1 2 3 4 5