Hi,
I have created a picture box(picture1) which will load an image. Within this picture box i have another smaller one (picture2) which is set to be background as transparent (still figuring out how to do this one from the other posts) and would like to move this small picbox with my mouse arnd and within the larger one. When click,that area within the small picbox would displayed like a zoom version enlarged in a new display(picture3).I understand theres many threads on this but Im not still not quite sure how to go about this. Ive never used APIs and strechblt as well. So if anyone could give me some pointers that would be great
Hi hack,
Have looked at the link, I kinda understand what it does but i dont really know where to put the code or how to use it. Ive created a test project containing a module with the bitblt declarations. But what do I put in the form, or in the pictureboxes to invoke this properly? Would it be possible to give me a working example? That would help heaps..
Hi,
Have uploaded the file, this is however just a test file to figure out how to do it. Ive manage to find an example on this forums for the transparent picturebox but would like the small picture box(Picture2) to display on a new picturebox when mousedown. And if Picture2 is clicked again it will zoom - say x2,x4,x8, and would display the selected area in Picture3. So each time it is click whatevers in the small picture box is displayed on the picture3.
If you can edit it and show me how it works that would be of great help.
The picture is loaded from a file and is not resized. I guess what Im trying to do is first enlarge the selection in Picture1 into the size of Picture3. Then when clicked, it will display the selection in a scale of 2x. For example if the selection(pic1) displays 30 grids, when clicked it will scale to 15grids of that area and display that 15grids in the size of pic3. I hope that explanation was right.
Hrrm as for the code above, Im not quite sure how to use that code within the test module. Is the ZoomPicture function with pct, pct being the picturebox that u click to zoom? like if that small picbox is clicked it will call the ZoomPicture function?
Sorry if its simple code and im not quite getting it.
Let's see if I understand the potato.
little picturebox is dragged around inside a bigger picturebox.
when the user relases the little picturebox, is grabs the potion of the big picture that is right under it.
Next the small portion is painted into a 3rd picture box which is bigger hence the zoom.
Yup someting like that, basically when u move the small pic box watever that is in it will be displayed in picture 3. Similar to what moeur said. But the portion thats in the small box should fit the whole of picture3 and not be the same size as the small box.