C# Panel

How to make Panel visible to flase from Form2 to Form1

Page 1 of 1

1 Replies - 1825 Views - Last Post: 04 November 2010 - 11:43 AM Rate Topic: -----

#1 lapeci_10   User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 16
  • Joined: 10-October 10

C# Panel

Posted 04 November 2010 - 11:38 AM

I have two forms (lkets say Form1 and Form2)

On Form1 I have a Button (inside Panel1) which calls Form2, and then on Form2 I have a button which calls up different controls.

Now my question is:

How can I make that Panel1 set visible to false when I click the Button on Form2...

Any help would be very very greatfull...

Thank you

Kind regards

Is This A Good Question/Topic? 0
  • +

Replies To: C# Panel

#2 tlhIn`toq   User is offline

  • Xamarin Cert. Dev.
  • member icon

Reputation: 6534
  • View blog
  • Posts: 14,450
  • Joined: 02-June 10

Re: C# Panel

Posted 04 November 2010 - 11:43 AM

Don't try to have form1 directly control form2 or vice versa. If they are going to be that tightly tied together they are hard to manage without breaking and might as well just be one form.

Instead you raise an event on form2, and let form1 react according to its own programming.
Form2 yells: "I'm done with Process x"
Form1 hears this then does its own thing in response. Form2 doesn't need to know what that reaction is.

Quick and easy custom events
Bulding an application - Part 1
Building an application - Part 2
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1