在C#中将图像添加为Windows窗体的背景 [英] Add Image as Background for a windows form in c#
本文介绍了在C#中将图像添加为Windows窗体的背景的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我想将图像设置为背景图像,并设置该图像,以使其在表单扩展时扩展.
预先感谢,
ArunKumar
Hi,
I want to set an image as background image and set that image so that it should expand when form expands.
Thanks in advance,
ArunKumar
推荐答案
亲爱的朋友,
Dear Friend,
panel1.BackgroundImage = Image.FromFile
(System.Environment.GetFolderPath
(System.Environment.SpecialFolder.Personal)
+ @"\Image.gif");
请按照以下步骤执行相同操作:-
http://msdn.microsoft.com/en-us/library/dff9f95f.aspx [ ^ ]
希望这会对您有所帮助.
Follow the steps to do the same:-
http://msdn.microsoft.com/en-us/library/dff9f95f.aspx[^]
Hope this will help you out.
这篇关于在C#中将图像添加为Windows窗体的背景的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文