我们可以将图像添加到面板吗?怎么样? [英] can we add image to a panel? how?

查看:77
本文介绍了我们可以将图像添加到面板吗?怎么样?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

任何人都可以帮助我...

有点紧急..

can anyone plzz help me...
somewhat its urgent..

推荐答案

你可以,但要么不直接,要么手动。

这取决于您所处的环境,但是如果您向Panel添加PictureBox并使用它来显示应该在大多数环境中工作的图像。
You can, but either not directly, or manually.
This depends on what environment you are in, but if you add a PictureBox to your Panel and use that to display the image that should work in most environments.


使用拖放操作非常简单。你可以玩它。



但下面显示了如何将图像添加到面板(假设它是一个Winform应用程序)。

Using Drag and Drop, it is very easy. You can play around with it.

But below is shown how to add image to panel (Assuming it is a Winform Application).
Panel panel = new Panal();
panel.Dock = DockStyle.Fill;

ImageBox img = new ImageBox();
// set your image to imagebox
panel.Controls.Add(img);

// you can set different properties as well..





-KR



-KR


这篇关于我们可以将图像添加到面板吗?怎么样?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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