Click to See Complete Forum and Search --> : Zoom in/out
hsteiner
Feb 15th, 2002, 06:28 PM
Hi,
I'm using a picture box/image box combination with vertical and horizontal scroll bars for opening and scrolling through a bitmap. I use the picture box and a mousedown event for digitizing coordinates. Problems are coming up when I want to zoom into a bitmap. The scrollbars have a limitted size and when the bitmap becomes too wide/height, I can't scroll any further. Any suggestions for zooming in/out and keeping the internal coordinate system for a mousedown event ??
Harry
/\/\isanThr0p
Feb 16th, 2002, 07:19 AM
I think you would need to change the max or min value on the scrollbars according to your zoom factor, but I really don't know how you programmed it so I can't know.
keeping the system could be archieved by getting the offset (scrollbar.value) multiplying this value with the zoomfactor (or not depending on how you managed that before) + the x or y value you get from the mouse down event and depending on what you really want to archieve taking this times the zoomfactor too.
hope that was any clear
Mad Compie
Feb 19th, 2002, 02:45 PM
Just show the visible surface of the zoomed image instead of the whole zoomed image, you will also save a lot of memory resources!
ma2trmod
Feb 20th, 2002, 06:45 AM
I have the same proble but i don't know how can i make zoom to a zone of the picture loaded in a picturebox control. Haw can i do that, please?
Originally posted by /\/\isanThr0p
I think you would need to change the max or min value on the scrollbars according to your zoom factor, but I really don't know how you programmed it so I can't know.
keeping the system could be archieved by getting the offset (scrollbar.value) multiplying this value with the zoomfactor (or not depending on how you managed that before) + the x or y value you get from the mouse down event and depending on what you really want to archieve taking this times the zoomfactor too.
hope that was any clear
/\/\isanThr0p
Feb 20th, 2002, 07:08 AM
hm I am sorry, but I don't understand your question.
Mad Compie
Feb 20th, 2002, 02:38 PM
Simple: using PaintPicture or BitBlt/StretchBlt
vbforums.com
Copyright Internet.com Inc., All Rights Reserved.