在.net中怎么设置背景图片?

来源:百度知道 编辑:UC知道 时间:2024/05/28 05:19:16

this.backgroundImage="图片地址"
可以先获取运行程序的地址保存在一个string字符串中,然后输入图片名,这样就相当于相对路径
如:string jiang=Environment.CurrentDirectory;
this.backgroundImage=jiang+"Image\\2.jpg";