Solved

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

Posted on 2012-03-26
1
335 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

Free Trending Threat Insights Every Day

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

The ECB site provides FX rates for major currencies since its inception in 1999 in the form of an XML feed. The files have the following format (reducted for brevity) (CODE) There are three files available HERE (http://www.ecb.europa.eu/stats/exch…
A long time ago (May 2011), I have written an article showing you how to create a DLL using Visual Studio 2005 to be hosted in SQL Server 2005. That was valid at that time and it is still valid if you are still using these versions. You can still re…
Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…
In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…

760 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

Need Help in Real-Time?

Connect with top rated Experts

17 Experts available now in Live!

Get 1:1 Help Now