private void pictureBox2_Paint(object sender, PaintEventArgs e) { // Create image. Image newImage = pictureBox1.Image; // Create coordinates for upper-left corner of image. int x = 100; int y = 100; // Create rectangle for source image. Rectangle srcRect = new Rectangle(facex, facey, 150, 150); GraphicsUnit units = GraphicsUnit.Pixel; // Draw image to screen. if(newImage != null) e.Graphics.DrawImage(newImage, x, y, srcRect, units); }
Thursday, March 8, 2012
how to Drawing image using e.Graphics into Control's Paint event
In this web Programming Tutorial we will learn that how we can Draw an image using e.Graphics into Paint event of control in asp.net using c#.
Labels:
asp.net
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment