Qbasicnews.com
February 23, 2020, 07:43:51 AM *
Welcome, Guest. Please login or register.

Login with username, password and session length
News: Back to Qbasicnews.com | QB Online Help | FAQ | Chat | All Basic Code | QB Knowledge Base
 
   Home   Help Search Login Register  
Pages: [1] 2 3
  Print  
Author Topic: I know, I must be stupid  (Read 9063 times)
EclipseOTO
New Member

Posts: 17


« on: June 08, 2006, 12:38:23 AM »

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...
Logged
Anonymous
Guest
« Reply #1 on: June 08, 2006, 12:53:05 AM »

forgive me for being blunt, but the stupid thing is that you haven't posted source code. Wink
Logged
Ralph
Ancient Guru
****
Posts: 544


« Reply #2 on: June 08, 2006, 01:23:00 AM »

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?
Logged

Ralph, using QuickBASIC 4.5 and Windows XP Home Edition and Service Pack 2, with HP LaserJet 4L printer.
EclipseOTO
New Member

Posts: 17


« Reply #3 on: June 08, 2006, 02:35:24 PM »

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!
Logged
Skyler
Ancient Guru
****
Posts: 564



« Reply #4 on: June 08, 2006, 02:40:03 PM »

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.
Logged

In the beginning, there is darkness the emptiness of a matrix waiting for the light. Then a single photon flares into existence. Then another. Soon, thousands more. Optronic pathways connect, subroutines emerge from the chaos, and a holographic consciousness is born." -The Doctor
Ralph
Ancient Guru
****
Posts: 544


« Reply #5 on: June 08, 2006, 03:02:46 PM »

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
Logged

Ralph, using QuickBASIC 4.5 and Windows XP Home Edition and Service Pack 2, with HP LaserJet 4L printer.
EclipseOTO
New Member

Posts: 17


« Reply #6 on: June 08, 2006, 03:23:54 PM »

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!
Logged
Ralph
Ancient Guru
****
Posts: 544


« Reply #7 on: June 08, 2006, 03:45:24 PM »

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.
Logged

Ralph, using QuickBASIC 4.5 and Windows XP Home Edition and Service Pack 2, with HP LaserJet 4L printer.
Ralph
Ancient Guru
****
Posts: 544


« Reply #8 on: June 08, 2006, 04:05:16 PM »

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?
Logged

Ralph, using QuickBASIC 4.5 and Windows XP Home Edition and Service Pack 2, with HP LaserJet 4L printer.
Moneo
Na_th_an
*****
Posts: 1971


« Reply #9 on: June 08, 2006, 04:06:34 PM »

Quote from: "Ralph"
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.
*****
Logged
Ralph
Ancient Guru
****
Posts: 544


« Reply #10 on: June 08, 2006, 04:24:20 PM »

Moneo:

I don't recall ever having used BRUN45.EXE to run a file before.  I was just curious about EclipseOTO's problem, and I wanted to see if th BRUN45 option also exhibited the same problem.  Now, I can go back to running only .bas or stand-alone .exe files Cheesy
Logged

Ralph, using QuickBASIC 4.5 and Windows XP Home Edition and Service Pack 2, with HP LaserJet 4L printer.
Skyler
Ancient Guru
****
Posts: 564



« Reply #11 on: June 08, 2006, 05:43:21 PM »

When I refered to the "Text " radiobutton, I was referring to the save-as dialog, not the compile dialog. QB4.5 has an option to save either in binary or text format- text is readable by other programs, i.e. notepad, so you can copy-paste into the forum. Binary loads and runs faster in QB.
Logged

In the beginning, there is darkness the emptiness of a matrix waiting for the light. Then a single photon flares into existence. Then another. Soon, thousands more. Optronic pathways connect, subroutines emerge from the chaos, and a holographic consciousness is born." -The Doctor
Ralph
Ancient Guru
****
Posts: 544


« Reply #12 on: June 08, 2006, 06:16:36 PM »

Skyler:  Of course!
Logged

Ralph, using QuickBASIC 4.5 and Windows XP Home Edition and Service Pack 2, with HP LaserJet 4L printer.
EclipseOTO
New Member

Posts: 17


« Reply #13 on: June 08, 2006, 11:09:20 PM »

Okay, I must be missing something.  When I open Qbasic and open the file, by going to file and then open, where I select the file (SPWRITER.BAS).  After this I cannot locate the two options "EXE Requiring BRUN45.EXE" or "Stand-Alone EXE File."  Here is where I am looking, I go to the top menu thing (with file, edit, view, etc...) and I click on RUN, this brings down the small menu and now I don't know what to click on!  Can someone please give me extremely specific details?  I'm sorry about being so computer inept....
Logged
Ralph
Ancient Guru
****
Posts: 544


« Reply #14 on: June 09, 2006, 01:19:59 AM »

Try this:
After you have your file loaded in QuickBASIC, click on Options, and then select Full Menus.  Now, click on Run, select Make EXE File, then select "EXE Requiring BRUN45.exe", or "Stand-Alone EXE File".  Of course, don't select the first, select the "STAND-ALONE EXE file".

Actually, if you choose Options, and deselect Full Menus, you can still click on RUN, Make EXE File, and then choose Make EXE File in the last menu that appears.  Here, there is no option to make an exe file that requires BRUN45.
Logged

Ralph, using QuickBASIC 4.5 and Windows XP Home Edition and Service Pack 2, with HP LaserJet 4L printer.
Pages: [1] 2 3
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.21 | SMF © 2015, Simple Machines Valid XHTML 1.0! Valid CSS!