如何在开关盒中使用图片框进行输入 [英] how to use picture box in switch case for taking a input

查看:61
本文介绍了如何在开关盒中使用图片框进行输入的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

实际上我必须开发win form.in这个我们必须使用7个图片框控件作为路由器。每个
路由器有一些节点。随机选择一个路由器然后选择节点作为源,并选择另一个用于接收文件的路由器。另一个路由器也会选择任何节点接收文件。



节点也像图片框一样。



如何在开关案例声明中使用图片框来获取输入。 />


请帮帮我

actually i have to develop win form.in this we have to use 7 picture box controls as routers .every

router has some nodes .randomly select a router then choose node for source and also choose another

router for receiving a file.another router also some nodes then choose any node for receiving a file.

nodes like as picture box also.

how to use picture box in switch case statement for taking a input.

pls help me

推荐答案

这听起来像是一个非常糟糕的候选人你可以选择组件使用。请查看我过去的答案:

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

画一个矩形C# [ ^ ],

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



该怎么办?如果问题不是那么模糊,我可能会建议一些事情。无论如何,如果你希望将一些图形与由 PictureBox 的实例形成的图像片段组合在一起,它将给你带来更多的麻烦而且没有任何好处。您确实需要将整个场景绘制为整个图形元素。图像可以使用 Graphics.DrawImage 显示或根本不使用。进一步的细节取决于你想要达到的目的。



-SA
It sounds like the picture box is a really bad candidate for the component you can use. Please see my past answers:
Append a picture within picturebox[^],
draw a rectangle in C#[^],
How do I clear a panel from old drawing[^].

What to do instead? I would probably advise something if the question was not so vague. Anyway, if you hope to combine some graphics with image fragments formed by the instances of PictureBox, it will give you a lot more troubles and no benefits at all. You really need to draw the whole scene as a whole graphical element. Images can be presented using Graphics.DrawImage or not used at all. The further detail depends on what exactly you want to achieve.

—SA


这篇关于如何在开关盒中使用图片框进行输入的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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