且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

如何从C#windows应用程序中的图片框中的当前选择移动上一个和下一个图像?

更新时间:2022-05-31 06:08:48

首先,停止使用 PictureBox 。这是一个冗余控件,它的所有合理用途都是避免在最简单的静态图像情况下自己编写一些简单的代码。在所有其他情况下,它提供的麻烦多于帮助。我会告诉你该怎么做:

附加图片框内的图片 [ ^ ],

画C#中的矩形 [ ^ ],

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



有关图形的更多详细信息渲染,实现交互行为和相关的失效,请参阅:

什么样的好玩方法是油漆? (DataGridViewImageCell.Paint(...)) [ ^ ],

在面板上捕获绘图 [ ^ ],

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

C#.net鼠标滚轮中的缩放图像 [ ^ ],

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



-SA
First of all, stop using PictureBox. This is a redundant control, all its reasonable use is to avoid writing some trivial code by yourself, in simplest cases of static images. In all other cases, it presents more hassles than help. I'll tell you what to do:
Append a picture within picturebox[^],
draw a rectangle in C#[^],
How do I clear a panel from old drawing[^].

For further detail on graphics rendering, implementing interactive behavior and related invalidation, please see:
What kind of playful method is Paint? (DataGridViewImageCell.Paint(...))[^],
capture the drawing on a panel[^],
Drawing Lines between mdi child forms[^],
Zoom image in C# .net mouse wheel[^],
How to speed up my vb.net application?[^].

—SA