Solved

Upon showing back a form after being hidden, how to refresh its contents?

Posted on 2012-03-26
1
346 Views
Last Modified: 2012-03-26
Hi

I'm using Visual Studio 2010 Professional and I have a Windows Application that contains two forms .. let's call them [Form1] and [Form2]

There is a button on each of those forms that toggles the show & hide functionality between these two forms, in more details:

[Form1] contains some dymanically-created controls at run time as well as contains a button that if clciked then to hide [Form1] and show [Form2]

[Form2] contains a button that if clciked then to hide [Form2] and show [Form1]



What I need is:

When clicking on the button that is in [Form2] then:

1st: Hide [Form2]
2nd: Show [Form1]
3rd: Dynamically recreate those controls in [Form1]


How do I achieve this (3rd) step?? I tried using the on "Shown" even of [Form1] but it didn't work!!!
0
Comment
Question by:alfardan
1 Comment
 
LVL 85

Accepted Solution

by:
Mike Tomlinson earned 500 total points
ID: 37769709
0

Featured Post

Master Your Team's Linux and Cloud Stack

Come see why top tech companies like Mailchimp and Media Temple use Linux Academy to build their employee training programs.

Question has a verified solution.

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

Suggested Solutions

For those of you who don't follow the news, or just happen to live under rocks, Microsoft Research released a beta SDK (http://www.microsoft.com/en-us/download/details.aspx?id=27876) for the Xbox 360 Kinect. If you don't know what a Kinect is (http:…
Calculating holidays and working days is a function that is often needed yet it is not one found within the Framework. This article presents one approach to building a working-day calculator for use in .NET.
Windows 10 is mostly good. However the one thing that annoys me is how many clicks you have to do to dial a VPN connection. You have to go to settings from the start menu, (2 clicks), Network and Internet (1 click), Click VPN (another click) then fi…
A short tutorial showing how to set up an email signature in Outlook on the Web (previously known as OWA). For free email signatures designs, visit https://www.mail-signatures.com/articles/signature-templates/?sts=6651 If you want to manage em…

773 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