Qbasicnews.com

Full Version: My morning experiment....
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Tongue Some1 else probaly already knows this.. But for those who might not..

You can make your .BAS file automaticaly open (if you use a IDE) the IDE with your code. Find one of your FB bas files, right click. Then select the "Open With..." opption.

Now, you get a gui menu, hit Others. Goto the exe of your IDE.. for me it was "C:\FreeBasics\FBIde.exe". Click ok.

If all was done right, your .bas icons will switch from the window's icon to a icon simular to the Ide's icon (Givin the IDE has a icon). And, upon clicking it, the Ide will open, and your code displayed..

Enjoy! :wink:
Keep in mind this only possible in windows xp and higher...dont know for sure if it works in w2k
and you can do it with other files to..
W98 < here..... Yeah, I did this by acsedent along time ago when new to comps in general, and messed up a few files (not any bas, way b4 I programed) by putting them under the wrong thing (Sorta, it said Open With? on clicking a file, I put something, bad idea.. lol) ..... and thus forgot about until to day, and did it w/ FreeBasic... Heh very nice,... :wink:
Yeah that works for most programs that have files that open in it. You can also choose the picture for .bas files or any type of files like that. This is helpfull if your computer has never ran across the file type and doesnt know what to do with it
Quote:Keep in mind this only possible in windows xp and higher...dont know for sure if it works in w2k
and you can do it with other files to..

This works for any version of windows. (well, 9x+)
It's actually Windows Shell (explorer) feature. As first Windows shell appeared in W95 it works from that version above. More info can be found on MSDN, Shell programming. It's handled trough COM technology. Registering filetypes can be done manualy thorugh GUI like Rattrapmax6 wrote or directly by manipulating registry keys. To each filetype an Verb can be attached, default one is Open action, but any action (verb) can be defined just like Print etc. Much more info you can find on net.
I made such things through the registry of my W95. For example to test the sprite editor i added a command to any file to open with it. I also assigned Notepad and DOS Edit to any file.
Remember though that this will only work if the program in question will accept a "passed" filename parameter.

Some programs are not designed for this and there is no way to force them.
Know to work on then: FB IDE... Von's one, I think there is another by that name... lol... This is why I called it. My Morning Experament.. Altho I already knew FB IDE could take passed parameters like that... :wink: (Look for my post with the Parameters mod for FB IDE)
1. go to explorer
2. view, folder options
3. file types

tadaa =P