Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
?
Solved

Opening an about window... then closing it

Posted on 2005-04-04
4
Medium Priority
?
157 Views
Last Modified: 2010-04-23
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
0
Comment
Question by:mnamiri
  • 2
4 Comments
 
LVL 12

Expert Comment

by:S-Twilley
ID: 13702906
       Dim frmAbout_inst As New frmAbout
        frmAbout_inst.ShowDialog()

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

Is this what you were after?
0
 
LVL 1

Expert Comment

by:basetew
ID: 13702978
S-Twilley is right. Don't forget to set frmAbout's StartPosition to CentreParent
0
 

Author Comment

by:mnamiri
ID: 13704758
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
 
LVL 12

Accepted Solution

by:
S-Twilley earned 750 total points
ID: 13707659
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

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This tutorial demonstrates one way to create an application that runs without any Forms but still has a GUI presence via an Icon in the System Tray. The magic lies in Inheriting from the ApplicationContext Class and passing that to Application.Ru…
It’s quite interesting for me as I worked with Excel using vb.net for some time. Here are some topics which I know want to share with others whom this might help. First of all if you are working with Excel then you need to Download the Following …
Loops Section Overview
Screencast - Getting to Know the Pipeline
Suggested Courses
Course of the Month15 days, 23 hours left to enroll

580 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question