Solved

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

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

How our DevOps Teams Maximize Uptime

Our Dev teams are like yours. They’re continually cranking out code for new features/bugs fixes, testing, deploying, responding to production monitoring events and more. It’s complex. So, we thought you’d like to see what’s working for us. Read the use case whitepaper.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
HTML - Color not displaying correctly in EMAIL. 6 49
VB.net capture  result of a SQL query in variables 3 20
Visual studio 2015 1 21
Please explain purpose of GZIP 4 34
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…
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.
This video shows how to use Hyena, from SystemTools Software, to bulk import 100 user accounts from an external text file. View in 1080p for best video quality.
Established in 1997, Technology Architects has become one of the most reputable technology solutions companies in the country. TA have been providing businesses with cost effective state-of-the-art solutions and unparalleled service that is designed…

856 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