Re: Beginner question
- From: "Mike Williams" <Mike@xxxxxxxxxxxxxxxxx>
- Date: Thu, 30 Jun 2005 09:25:48 +0100
"eeh" <eehobbyist@xxxxxxxxxxxx> wrote in message
news:1120108391.410174.229010@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
> I am just a VB beginner . . . how to exit the main program in VB?
You've already had answers to your questions, but just to add a little note
you'll find that it is not usual to "exit the main program" at all for many
of the VB execs that you create. Have a look at most of the applications
that you use on your own computer (the Calculator, your word processor, your
newsreader program, a wav file editor, a graphics or drawing program, a disk
copier, etc, etc). Those applications (execs) do not end at all until the
*user* decides to end them (usually by pressing the little close button at
the top right of the window). If there is something specific that you want
your VB exec to do when the user does decide to end the program (write high
score tables to disk in a game for example) then you should place your code
that does that job in the main Form's QueryUnload event (if your app has a
Form, that is). The code in that event will be executed whenever your
program shuts down, for whatever reason (unless you use the "dreaded" End
statement in your own code, which Jerry has already quite rightly told you
*never* to use).
Mike
.
- Follow-Ups:
- Re: Beginner question
- From: Ross
- Re: Beginner question
- References:
- Beginner question
- From: eeh
- Beginner question
- Prev by Date: Re: create multiple Check Boxes at run time
- Next by Date: Re: Beginner question
- Previous by thread: Re: Beginner question
- Next by thread: Re: Beginner question
- Index(es):