Click here to Skip to main content
15,889,034 members
Please Sign up or sign in to vote.
1.00/5 (2 votes)
See more:
i have two pictureboxes. picbox1,picbox2.
on mousedown event i want to select two different coordinates in picbox1 that is x,y and x1,y1, and show the same pic of picbox1 in picbox2 with the selected coordinates.
please help me how to do it.
Thanks in advance
Posted

First of all, if you want something like that, forget PictureBox, it will only add hassles and waste some resources, giving you nothing in return. Not that it cannot be implemented, just makes no practical sense, as PictureBox is just a (redundant) "helper" control designed to help you to show some image in simplest cases, without any manipulations. If you need some manipulations, it will be million times easier to do it all by yourself, in your own control or even available control, including Form.

For further detail, please see my past answers:
Append a picture within picturebox[^],
draw a rectangle in C#[^],
How do I clear a panel from old drawing[^].

And also those answers:
capture the drawing on a panel[^],
What kind of playful method is Paint? (DataGridViewImageCell.Paint(...))[^],
How to speed up my vb.net application?[^],
Drawing Lines between mdi child forms[^].

I hope this will help you to solve your problem easily.

—SA
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900