Solved

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

Posted on 2012-03-26
1
361 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment
 
LVL 86

Accepted Solution

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

Featured Post

Technology Partners: 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 article describes relatively difficult and non-obvious issues that are likely to arise when creating COM class in Visual Studio and deploying it by professional MSI-authoring tools. It is assumed that the reader is already familiar with the cla…
More often than not, we developers are confronted with a need: a need to make some kind of magic happen via code. Whether it is for a client, for the boss, or for our own personal projects, the need must be satisfied. Most of the time, the Framework…
This video Micro Tutorial shows how to password-protect PDF files with free software. Many software products can do this, such as Adobe Acrobat (but not Adobe Reader), Nuance PaperPort, and Nuance Power PDF, but they are not free products. This vide…
Monitoring a network: why having a policy is the best policy? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the enormous benefits of having a policy-based approach when monitoring medium and large networks. Software utilized in this v…

729 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