Raul Junc

Raul Junc

  • NA
  • 15
  • 8.9k

Button in the class

Mar 1 2011 4:05 PM
I have a Question:

public class Meniu
        {
            Button button1, button2;

            public Meniu()
            {
                button1 = new Button();
                button1.Parent = ;
                button1.Text = "Test nou";

                button2 = new Button();
                button2.Parent = Form1;
                button2.Text = "Incarca test";
            }
        }

I have this code... I think you understand what i want to do.
This is a class and i had declared 2 buttons and in the constructer i make them.
But the how can i put theme on the form? it give me error at the "this" and "Form1"

Ty for you're time :D

Answers (7)