Fast drag zoom control

  • Thread starter Thread starter Carl Gilbert
  • Start date Start date
C

Carl Gilbert

Hi
I was looking for a component that will enable me to zoom into an image very
easily and quickly. I was hoping there may be something, perhaps part of
VB.NET, that will allow me to drag a box over a selected area and this would
then be displayed at full screen.

Any help on this would be greatly appreciated.
Kind regards, Carl Gilbert
 
Seems like that would just be a matter of stretching the bitmap using GDI+

and then moving the image within the picturebox control so that it showed
the part you were interested in.

Have you tried that?

Should not be too hard I wouldn't think.

Am I missing something?

Shane
 
Ok, that sounds like it could be fairly simple.

I have never used GDI+ before so do you know where I can find either
some sample code or any tutorials/books that may help?

Carl
 
Well if you ever used GDI, then there are I guess some similarities in what
is available, but not quite as difficult to use.

Most things based around the graphics object

You always get one in the _paint event

so like
e.graphics.DrawString for example.

There is a Bitmap class that you can stretch an image with.
It has many constructors and seems one of them allows you to pass in an
image(I am not currently working in the IDE)

There is another function that can be used to stretch. I think it was
DrawImage or something similar.
The idea is to draw in memory giving a source and destination and changing
height x width on the destination so that it will be stretched.

I guess with enough math you would have the rubber banding rectangle with
the mouse, they let go, you take the whole image, stretch it, put back in
and calulate where to scroll to so that the right part shows.

There may be an easier way...if anyone knows of one... please post it. I am
fairly new to GDI+ also.

HTH some,

Shane

ps... Ken's links provide a lot of good info.
 
Back
Top