I have not been able to get the picturebox to do any of the following<br>
1. zoom in or out<br>
2. move around (like panning)<br>
3. copy a portion of it to the clipboard<br>
<br>
But maybe this will get you going<br>
AutoRedraw property needs to be True on both pictures.<br>
Start with the mouse down event of the first picture box<br>
you need to save the X & Y coordinates of the first click in global variables<br>
then put a small cross hair there with the line property of the picture so your eye knows where you clicked.<br>
<br>
Next click the other corner of the picture get its X-Y coords.<br>
I put two text boxes on the form so I can see the X and Y coords when I programming a picture box <br>
You can erase them later.<br>
Change the mouse to cross hair if you like in the pictures MouseIcon property<br>
<br>
After that I'm not sure<br>
Erik<br>
<br>
What exactly do you want to do? <br>
1) Do you want to mark parts of a picture with a mouse and then copy those to another picture? <br>
2) If Yes, are these regular, i.e. Square, Rectangular, Circular, or are they irregular, i.e. drawn freehand?<br>
or<br>
3) Do you want to click on a button to have a predefined part of a picture copied?<br>
<br>
Based on your answers to these I can send you info on how to do each. In the mean time, if you are not familiar with the BitBlt API function, I would suggest having a look at the code code I posted a few weeks ago.<br>
<br>
-Ian
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.