Opening an about window... then closing it

Hi,

I have two forms: frmMain and frmAbout.

Effectively, I just want to show frmAbout as a 'showModal' state form when the user selects a menu item.

When the user finishes reading frmAbout i want him to be able to click on a close button and have the application focus return to the mainfrm.


I've been searching around and i've seen some very complex solutions to this- im sure there is a straightforward and VERY easy way to do this...



thanks
mnamiriAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

S-TwilleyCommented:
       Dim frmAbout_inst As New frmAbout
        frmAbout_inst.ShowDialog()

=============

Is this what you were after?
0
basetewCommented:
S-Twilley is right. Don't forget to set frmAbout's StartPosition to CentreParent
0
mnamiriAuthor Commented:
and what about closing the form?
I immagine you just say Me.Close()

is that right?

additionally, would I need to de-allocate any memory etc. i have assigned to creating the new form?
0
S-TwilleyCommented:
to close the about form, you can use Me.Close (within the form code itself)... or use the close button (i.e. the cross in top right), or other standard method....

as far as i know, if you use...

        Dim frmAbout_inst As New frmAbout
        frmAbout_inst.ShowDialog()

within a method body and then close it... the memory will eventually be deallocated, but since this is not a memory intensive task and wont be repeated over and over in quick succession, the wait for the GC (garbage collection) to deallocate it from memory won't be a problem
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Visual Basic.NET

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.