tata

tata

  • NA
  • 3
  • 0

how to call a static function of class Form?

Mar 24 2010 10:07 AM
I want to create a function "public static void draw()" in class "public partial class Form1 : Form" in my C# window form application.

When i set static to my own function , i can not use controls in form . Specific , i want to use event Paint of a my panel in form ( i name it is panel1 ) by call panel1.Invalidate(); in my own function (draw) . But when my function is set to static ( i want use it in other class ) , i can not use this control panel. Can you help me a solution? Thank you very much.

Answers (2)