Results 1 to 5 of 5

Thread: Changed .BAS to .QB, but...

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Apr 2003
    Location
    Georgetown, Texas
    Posts
    114

    Changed .BAS to .QB, but...

    Recently, I posted a question, asking how I could change all my QuickBASIC 4.5 files from the extension .BAS, which has now been appropriated by VB6, to .QB, which, I suspect, the installation of VB6 has now assigned as the proper termination for QB. Jian gave me a very good answer, which I have now implemented.

    Now, every time I start QB, and go to the File, Open, I get the old default of *.BAS, which I then have to change to *.QB, in order to see all the QB files, which are now terminated with the extension .QB.

    I have gone to DOS, invoked EDIT.com, opened QB.exe, did a Search, Find and put in .BAS. I got two strikes, "*.BAS" and ".BAS", and changed both to "*.QB ", saved the modified QB.exe file, and closed EDIT.com.

    Next, I doubled-clicked on the modified QB.exe. I got a fatal-error type message, and my computer locked up, having to use the ON/OFF switch and go through the usual hassle of re-starting!

    My question is: does anybody have a method by which I can make QB.exe show "*.QB " in my File, Open window, so that all such files in the current directory show up, without my having to change the default manually each time from "*.BAS" to "*.QB"?

  2. #2
    I'm about to be a PowerPoster! kleinma's Avatar
    Join Date
    Nov 2001
    Location
    NJ - USA (Near NYC)
    Posts
    23,373
    lol well first off you can't edit an exe in dos using the edit command.. it will corrupt it (as your fatal error has shown you)

    you don't need to change the name of your old files... they can coexist with your VB6 .bas files.. just don't open a QB file in VB6 and vice versa. Although opening a QB file in VB6 would probably still work since they are just text files. VB6 bas files might even open in QB, but of course they wouldnt run because syntax is different.

    so as long as you open your QB files in QB, you should be able to leave them as .BAS files

  3. #3

    Thread Starter
    Lively Member
    Join Date
    Apr 2003
    Location
    Georgetown, Texas
    Posts
    114
    Thank you, Matt, for your answer, which is certainly appropriate and practical. However, in this case, anytime I double click on any .bas file, VB will open and try to load that file, with the resultant error report, due to QB and VB not being totally compatible.

    What I would like is to have "*.qb" appear when I open QB, with all the .QB files in the current directory listed.

    As far as modifying an .exe file successfully, well, I HAVE modified .exe files in the past, where a string was concerned. Say the the file shows "This program does this!". Well, I found that if I obeyed the rule of retaining the length of the string, I could do any change in it, and the new string would appear in the modified .exe file.

    In the present case, it would appear that the "*.BAS" and the ".BAS" that I see (the quotation marks are mine), are NOT strings, since, then, I would expect the modified .exe program to work, as usual.

    Any more good suggestions?
    Last edited by RAEsquivelC; Aug 11th, 2003 at 12:36 PM.

  4. #4
    I'm about to be a PowerPoster! kleinma's Avatar
    Join Date
    Nov 2001
    Location
    NJ - USA (Near NYC)
    Posts
    23,373
    ultimatly you will just have to open qbasic and then load the qbasic .bas files from within it.. instead of double clicking them...

    another option is the "Open With" that you see when you right click on a file... you can set files to have multiple programs in the list when you go to "Open With" so you could put QBasic and VB6 in the listing for .bas files and you could select the appropriate program to open from there...

    you could try to change them to .qb files and set them to open with qbasic in windows... but depending on if the qbasic .exe will recognize them and load them automatically.. i am not sure

  5. #5

    Thread Starter
    Lively Member
    Join Date
    Apr 2003
    Location
    Georgetown, Texas
    Posts
    114
    Again, thank you for your help and your quick replies. Jian had suggested a way of changing all the QB files ending in .bas, to .QB, which I did, because QB.exe now shows .QB as the proper extension for its files. And, yes, double clicking DOES open the .QB files in QuickBASIC. Tha is O.K. It's only when I open QB.exe, then click on File, Open, that the *.bas still appears and, since all my QB files now have the extension .QB, no files are shown, until I change the *.bas to *.QB

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width