7
Reply

Button in the class

Raul Junc

Raul Junc

Mar 1 2011 4:05 PM
3k
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)