本文介绍了如何在Windows窗体PictureBox中选择一个区域?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我想通过允许用户选择A矩形区域(类似于它如何在Photoshop中进行与选择工具),以获得在PictureBox图片的一部分。
I want to get a part of picture in a PictureBox by allowing the user to select a rectangular region (similar to how it can be done in Photoshop with selection tool).
我怎么能这样做呢?
推荐答案您必须借鉴的基础上,他们点击和拖动矩形或线条。你的出发点是鼠标X,Y,然后你会得到从鼠标释放X,Y的最后一点。
You would have to draw a rectangle or lines based on where they clicked and dragged. Your starting point would be the mouse x, y and then you would get the last point from mouse release x, y.
更多推荐
如何在Windows窗体PictureBox中选择一个区域?
发布评论