Live Chat Icon For mobile
Live Chat Icon

WinForms FAQ - Docking

Find answers for the most frequently asked questions
Expand All Collapse All
private void Form1_Load(object sender, System.EventArgs e)
{
  Bitmap newBmp = new Bitmap(100, 100);
  Graphics g = Graphics.FromImage(newBmp);
  g.FillRectangle(new SolidBrush(Color.Red), 0, 0, 33, 100);
  g.FillRectangle(new SolidBrush(Color.White), 34, 0, 33, 100);
  g.FillRectangle(new SolidBrush(Color.Blue), 68, 0, 33, 100);
  pictureBox1.Image = newBmp; //pictureBox1 was dropped on the form
}

Permalink

Share with

Share on twitter
Share on facebook
Share on linkedin

Couldn't find the FAQs you're looking for?

Please submit your question and answer.