在picturebox1中获取多个坐标并在图片框2中显示它们 [英] getting multiple coordinates in picturebox1 and show them in picture box2

查看:156
本文介绍了在picturebox1中获取多个坐标并在图片框2中显示它们的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有两个图片盒。 picbox1,picbox2。
$ m $ b在mousedown事件中我想在picbox1中选择两个不同的坐标,即x,y和x1,y1,并在picbox2中显示与所选坐标相同的picbox1图片。 />
请帮我怎么做。

提前谢谢

解决方案

首先,如果你想要的话像这样,忘记 PictureBox ,它只会增加麻烦并浪费一些资源,不给你任何回报。并非它无法实现,只是没有实际意义,因为 PictureBox 只是一个(冗余)帮助控件,旨在帮助您在最简单的情况下显示一些图像,没有任何操纵。如果你需要一些操作,那么你自己,你自己的控制甚至是可用的控制,包括 Form ,这样做会容易百万倍。



详情请见我过去的答案:

在图片框中附加图片 [ ^ ],

在C#中绘制一个矩形 [ ^ ],

如何从旧图纸中清除面板 [ ^ ]。



以及那些答案:

在面板上捕捉图纸 [ ^ ],

什么样的俏皮方法是Paint? (DataGridViewImageCell.Paint(...)) [ ^ ],

如何加速我的vb.net应用程序? [ ^ ],

mdi子表单之间的绘制线 [ ^ ]。



我希望这可以帮助您轻松解决问题。



-SA


得到了确切的解决方案:

http://blog.csharphelper.com/2010/ 04/18 / copy-an-irregular-area-from-one-picture-to-another-in-c.aspx [ ^ ]


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

解决方案

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


got the exact solution:
http://blog.csharphelper.com/2010/04/18/copy-an-irregular-area-from-one-picture-to-another-in-c.aspx[^]


这篇关于在picturebox1中获取多个坐标并在图片框2中显示它们的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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