Zoom in Image

  • Thread starter Thread starter Alberto
  • Start date Start date
A

Alberto

I have a program who works with images and I show them in image controls.
I'd like to make a zoom when the user makes a click over one of them.

Could you give any clue to do it?
Thank you very much.
 
Alberto,

In this case, I would custom draw the area. What you could do is take a
control, and override the OnPaint method. When you do that, you can call
the DrawImage method on the Graphics instance passed to the method (through
the EventArgs passed in). You would call the overload that allows you to
specify the section of the image that you want to draw, and the section of
the graphics context you want to draw it on. The API will take care of the
scaling issues.

Hope this helps.
 
Back
Top