Esempio n. 1
0
        public ButtonContainer(MyForm mf, Rectangle rect, Color bcolor, ButtonCodes bc)
        {
            myForm     = mf;
            clickValue = bc;

            // create the button and link the click call back
            myButton = new Button();
            myButton.DialogResult = DialogResult.OK;
            myButton.Click       += new EventHandler(ButtonClick);
            myButton.Bounds       = rect;
            myButton.BackColor    = bcolor;
            myForm.Controls.Add(myButton);
        }
Esempio n. 2
0
        public static void Main(string[] Args)
        {
            MyForm mf;

            mf = new MyForm();
            mf.Invalidate();

            // create the form
            mf.BackColor = Color.Gray;
            mf.Bounds    = new Rectangle(0, 0, 740, 535);
            mf.Text      = "Ghost Party";

            mf.CreateButtons();

            mf.localG = mf.CreateGraphics();

            // show form
            mf.Show();

            // manage the form
            System.Windows.Forms.Application.Run(mf);
        }