图片框具有调整大小和旋转矩形 [英] Picturebox with resize and rotate rectangle

查看:71
本文介绍了图片框具有调整大小和旋转矩形的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

你好,

有谁知道如何使用鼠标事件创建可调整大小且可旋转的图片框?

谢谢.

TY

Hi there,

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

Thanks.

TY

推荐答案

您不需要.不要犯滥用PictureBox的常见错误.此类对于某些简单目的可能是有帮助的,但是如果您尝试实现任何动态或交互行为,则它没有任何价值,而在实现中仅提供附加的麻烦(您可以这样做,但是会浪费时间来解决您不愿意解决的问题"不必解决)并浪费额外的资源.

您只是不需要它.您需要使用基于Control类的类.我将为您解释所需的一切.请查看我过去的解决方案:

如何从旧图纸中清除面板 [ ^ ],
Paint是一种哪种好玩的方法? (DataGridViewImageCell.Paint(...)) [在mdi子表单之间画线 [在面板上捕获图形 [
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.

—SA


这篇关于图片框具有调整大小和旋转矩形的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆