Click here to Skip to main content
15,878,945 members
Please Sign up or sign in to vote.
1.00/5 (2 votes)
See more:
Hi there,

Anyone know how to create a resizable and rotatable picturebox using mouse event?


Sergey Alexandrovich Kryukov 15-Jan-12 12:22pm    
Shahin Khorshidnia 15-Jan-12 12:54pm    
Hello, Winodws? Web? WPF? What?

1 solution

You don't need to. Don't make a common mistake of abusing PictureBox. This class can be helpful for some simple purposes, but if you try to implement any dynamic or interactive behavior it provides no value but only additional hassles in implementation (you can do it, but would waste your time for solving problem which you don't have to solve) and wasting extra resources.

You just don't need it. You need to use the class based on Control class. I'll explain you all you need. Please see my past solutions:

How do I clear a panel from old drawing[^],
What kind of playful method is Paint? (DataGridViewImageCell.Paint(...))[^],
Drawing Lines between mdi child forms[^],
capture the drawing on a panel[^].

The right approach is much easier to implement, more universal, allows for unlimited number of effects and behaviors, don't overuse system resources.

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