private void pictureBox1_MouseMove(object sender, MouseEventArgs e) { pictureBox1.Refresh(); System.Drawing.Graphics g = pictureBox1.CreateGraphics(); System.Drawing.Pen p = new System.Drawing.Pen(System.Drawing.Color.Blue); g.DrawRectangle(p, new Rectangle(e.X, e.Y, 40, 80)); p.Dispose(); g.Dispose(); }
Friday, November 18, 2011
C# - Draw a Rectangle on a Picture Box on Mouse-Move
Thursday, November 17, 2011
Subscribe to:
Posts (Atom)