How do you exit a Visual Basic program (like I need a function call to close one I'm making)?

Noriaki

Lifer
Jun 3, 2000
13,640
1
71
Okay so I'm writing my first ever VB app.

I've used about 5 different IDEs so I don't need help on that. But I don't know the basic language at all.
I've got everything I need working except one little button.

I just want to have an Exit button.

They can click the X to end...but I want a button for it to.

Here's the way it works...

I have a main form (called fMain)

So on the exit button on fMain the function goes like this:

Dim fGameOverForm as GameOverForm
Set fGameOverForm = New GameOverForm
fGameOverForm.Show
fMain.Hide

(I have a type of Dialog box GameOverForm built and defined)

That button works fine.
The GameOver form shows up fine.

But now I want to have an Exit button on the Game Over form to close the whole application.

I'm sure it's something obvious.....but I can't seem to figure out what it is...

Give me a break okay? I spent 10 hours today programming in Object Oriented Perl...I'm totally brain fried right now.

Anyways, what's the function call to kill the whole application?

TIA
 

Ns1

No Lifer
Jun 17, 2001
55,420
1,600
126
Unload fMain

or exit? or end? something like that

they both work ^_^
 

Noriaki

Lifer
Jun 3, 2000
13,640
1
71
Ahhh hell ;)

I was trying fMain.Unload (and fMain.exit and fMain.kill and fMain.anythingelsethatmightberemotelyrelatedtoendingaprogram)

heh

Thanks man. That did the trick.