exit & msgbox?

whosyodaddy

Well-known member
Joined
Jun 23, 2003
Messages
83
is it possible so that when the user clicks on exit in the mainmenu, it exits, and then displays a messagebox? vise-versa. this doesnt work:

Form1.ActiveForm.Close() & MessageBox.Show ("This method does not work please help!")

if there is no way then how would you link the Exit to another Form, and then when you click OK on the other form it quits both forms?
 
Like this :) :
Code:
Private Sub Form1_Closed(ByVal sender As Object, ByVal e As System.EventArgs) Handles MyBase.Closed
        MsgBox("Your message here")
End Sub
 
whosyodaddy, I have seen you ask a lot of *simple* questions, I think it might be an idea for you to look into buying a small book on basic events and happenings in VB. Or look at some online samples/tutorials to see how the application hangs together.

It will increase the speed at which you learn, and you have something to compare against.



*My definition of simple :)
 
Grimfort, i am new to .NET and just need to know some simple stuff. Books dont provide the answers i need though. Im thinking of buying "Visual Basic.NET Step by Step". These forums are also a friendly environment and understand what i need help with.
 
Forums are very useful, no doubt about that. When I started, I went through a few books (online samples) to work out OOP basics and things like creating forms, adding menus, adding code to events etc etc...

There are lots of good books about, you should look if you are thinking of learning seriously.
 
Back
Top