BUTTON CONTROL
private void
button1_Click_1(object sender, EventArgs e)
{
Image image = Image.FromFile("E:\\WindowsFormsApplication4\\WindowsFormsApplication4\\images.jpg");
Control[] Co = this.TopLevelControl.Controls.Find("label1", true);
Control[] Co1 = this.TopLevelControl.Controls.Find("pictureBox1", true);
Co[0].ForeColor = System.Drawing.ColorTranslator.FromHtml("green");
Co1[0].BackgroundImage = image;
Co1[0].Height
= image.Height;
Co1[0].Width =
image.Width;
}
No comments:
Post a Comment