Click to See Complete Forum and Search --> : zoom a specific area?????
loud_whisper
Nov 25th, 2000, 11:03 AM
Hi.....
how i can zoom a specific area in a picture.
like when i click a picture so i want the area under the mouse i can zoomin and zoom out.
i wish u can help me.....Nona
/\/\isanThr0p
Nov 25th, 2000, 06:20 PM
Two easy possibilities:
use an image control place in into a picturebox as frame.
Set the stretch property to true and just stretch the left/right width/height properties.
Or use stretchblt
loud_whisper
Nov 27th, 2000, 05:38 AM
Can u explanation more for me.....how i can do it
/\/\isanThr0p
Nov 27th, 2000, 09:37 AM
I think I already explained the oe with the image control (the easier way), so I explain the stretchBlt now. If there are problems left(will probably happen since I don't know what you know), just write me an email or contact me on ICQ.
First you have to import the Function StrechBlt and the RasterOperationCode SRCCOPY from the API Viewer.
The you show the Picture in a PictureBox on the form.
No You can let the user select an area in any way you like. From the selection a point (x,y) should result which specifies the left top point of the rectangle you want to zoom to, and a width and height, that specify the width and height of the area you want to show zoomed.
now you blit it with strechBlt to you picbox
for x and y you will use 0 for the new Width and Height (nWidht/ nHeight) you use the width/height of your poicturebox. For the xSrc and the ySrc the (x,y) resulted from the selection, and for nSrcWidth/nSrcHeight the width and height resulted from the selection.
I hope you could understand this, if not just write me.
loud_whisper
Nov 28th, 2000, 03:51 PM
SORRY ...
I did not understand !!!!!!
/\/\isanThr0p
Nov 28th, 2000, 07:13 PM
DO you have ICQ? or can you email me to FGutjahr@gmx.de?
If not I'll have another try in here, but I have more time when I am actually at home.
vbforums.com
Copyright Internet.com Inc., All Rights Reserved.