Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

How to get a hidden form to reapear again

Posted on 2009-07-14
2
Medium Priority
?
242 Views
Last Modified: 2013-11-26
I have two separate form. the fiorst form loads and then I have a button on that page that will go to the next form, The trick is that if I hit that button I hide the loaded form and open the new form. If I close the New form how can I get the loaded form back?
ElseIf GaugeModel.Contains("200") Or GaugeModel.Contains("SealGap") Then
                Dim form As New EditGages
                serialCOMDiscover.Close()
                ' Me.Hide()
                Me.Visible = False
                form.Show()

Open in new window

0
Comment
Question by:cmdolcet
2 Comments
 
LVL 48

Accepted Solution

by:
jpaulino earned 1000 total points
ID: 24849483
Have you tried myForm.Show  ? you can also use My namespace to do that.
My.Forms.myForm.Show()
0
 
LVL 14

Expert Comment

by:shahprabal
ID: 24849735
When you show the second form show it modally :
form2.ShowDialog
so the next line in the main form's code won't get executed till form2 is closed.
Then just make mainform visible again.
mainform.hide
form2.ShowDialog          'passes control to form2 where you would have form2.close
mainform.show
 
0

Featured Post

Veeam Disaster Recovery in Microsoft Azure

Veeam PN for Microsoft Azure is a FREE solution designed to simplify and automate the setup of a DR site in Microsoft Azure using lightweight software-defined networking. It reduces the complexity of VPN deployments and is designed for businesses of ALL sizes.

Question has a verified solution.

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

Creating an analog clock UserControl seems fairly straight forward.  It is, after all, essentially just a circle with several lines in it!  Two common approaches for rendering an analog clock typically involve either manually calculating points with…
In real business world data are crucial and sometimes data are shared among different information systems. Hence, an agreeable file transfer protocol need to be established.
This course is ideal for IT System Administrators working with VMware vSphere and its associated products in their company infrastructure. This course teaches you how to install and maintain this virtualization technology to store data, prevent vuln…
How to fix incompatible JVM issue while installing Eclipse While installing Eclipse in windows, got one error like above and unable to proceed with the installation. This video describes how to successfully install Eclipse. How to solve incompa…
Suggested Courses

971 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