Call panel.invalidate outside form class in C#

Posted by Shaza on Stack Overflow See other posts from Stack Overflow or by Shaza
Published on 2010-04-21T19:36:57Z Indexed on 2010/04/21 20:03 UTC
Read the original article Hit count: 213

Filed under:
|

Hey, I need to call "panel.invalidate" outside my form (WINform) class also I need to change some other controls as well, I read similar question here, and tried what they said, but it didn't work and I wasn't convinced at all.

The answer I read was about exposing a public method like this:

public void EnableButton(bool enable)
{
    this.myButton.Enabled = enable;
}

Also I made a static instance in the other file

 static Form1 myForm = new Form1();

Any useful suggestions??

© Stack Overflow or respective owner

Related posts about c#

Related posts about winforms