// Create a new PictureButton control and hook up its properties. public PictureButtonDemo() { InitializeComponent(); // Display the OK close button. this.MinimizeBox = false; PictureButton button = new PictureButton(); button.Parent = this; button.Bounds = new Rectangle(10, 30, 150, 30); button.ForeColor = Color.White; button.BackgroundImage = MakeBitmap(Color.Blue, button.Width, button.Height); button.PressedImage = MakeBitmap(Color.LightBlue, button.Width, button.Height); button.Text = "click me"; button.Click += new EventHandler(button_Click); }
// Create a new PictureButton control and hook up its properties. public PictureButtonDemo() { InitializeComponent(); // Display the OK close button. this.MinimizeBox = false; PictureButton button = new PictureButton(); button.Parent = this; button.Bounds = new Rectangle(10, 30, 150, 30); button.ForeColor = Color.White; button.BackgroundImage = MakeBitmap(Color.Blue, button.Width, button.Height); button.PressedImage = MakeBitmap(Color.LightBlue, button.Width, button.Height); button.Text = "click me"; button.Click +=new EventHandler(button_Click); }