10-23-2001, 06:15 PM
Countless times, I've been writing something, spend a long time writing it, and I forget to save before I compile it. Then the program freezes, not even Ctrl+Break works. So, I'm forced to use Ctrl+Alt+Del to regain control. This (obviously) closes VB and I lose my work. Well, I was looking in the VB Options, and I discovered something that I am incredibly grateful for.
If you go to Tools >> Options >> Environment, you will see a frame called "When a program starts:". If you change this option to Save Changes, VB will save your project before it compiles it. Then, you don't have to worry next time your program freezes and you forgot to save.
I understand that some of you probably knew about this a long time ago, but I was so happy when I discovered this I thought I'd let ya'll know. Well, have fun freezing your computer! images/icons/smile.gif
10-23-2001, 06:42 PM
I totally agree that this is a great thing to do. I once worked on a program
for 4 hours. Never saved it once. If you do this long enough, it is an
absolute guarantee that one time, the IDE will freeze. It did and I lost 4
hours work. That is when I set that option, and have been glad I did on
more than one occasion.
10-23-2001, 08:31 PM
i totaly agree, this option should almost be set by default! i also had a bad experience once with a realy complicated math routine that i was working on for a few hours and when i finally had it working the app froze so... lost everything!
10-24-2001, 02:02 AM
I use the "Prompt to Save Changes".
I don't want every simple test I do (eg for the Forums) to save a project.
10-24-2001, 03:22 AM
It'll only save automatically if it's already got a filename. So you load a new IDE, type a program and run it then it'll ask for a filepath. Just press escape for each file (there shouldn't be too many for examples).
The autosave feature can be dangerous if you are trying something new, it fails and crashes the IDE and you then have to try to remember what the original state of the code was! I've had this a number of times (normally when dealing with sub-classing images/icons/smile.gif).
10-24-2001, 07:40 AM
I do use the prompt to save but I consider that the same thing. If testing
something I don't care about, or that I wouldn't want to make a permanant
part of my project, I just say no.
10-24-2001, 11:39 AM
I, too, use the prompt to save feature, and have found it *extremely* helpful when I kill my computer with new "features".
10-25-2001, 09:24 AM
Great ! I was just looking for that, i also lost 3 hours of work another day...
10-25-2001, 09:34 AM
Theres another feature I heard about but couldnt find out how to do it......
It was so that when I add a module, form, or class, the line Option Explicit is already added for me. I heard about it, but I cant remember how to turn it on......
Plus, the other day on IRC myself and others were trying to remember how to add a new template to the 'New Project' dialog box, so I can include my module with the VB6 emulated functions with a standard EXE.
10-25-2001, 09:37 AM
Under Tools/Options on the Editor tab, select Require Variable Declaration to have Option Explicit added for you...
10-25-2001, 04:19 PM
Just make a new project and save it in the vb directory/templates/projects
You can do the same with forms, etc.