本文介绍了如何访问我的解决方案浏览器图像的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,

我正在C#语言中使用Windows应用程序.

我想为图像设置面板背景.编码.我正在使用panel1.setBackground("C:\\ Documents and Settings \\ Administrator \\ My Documents \\ Downloads \\ playlistmoves \\ Resources \\ container.JPG");

上面的setbackground效果很好.

但是,同一张container.jpg图片中我有我的解决方案资源管理器或资源"文件夹.不使用本地主机路径,如何访问我的资源映像.

SetBackground("??????");


问候
Vasanth

Hi Guys,

I am using windows Application with C# Languvage.

I want to set the panel background for image via. Coding. I am using panel1.setBackground("C:\\Documents and Settings\\Administrator\\My Documents\\Downloads\\playlistmoves\\Resources\\container.JPG"");

This above setbackground is works good.

But that same container.jpg image i have my solution Explorer inside or Resource folder. Without using the local host path how can i access my Resource image.

SetBackground(" ?????? ");


Regards
Vasanth

推荐答案

panel1.BackgroundImage = Properties.Resources.Container;



就这样...尽情享受



That''s it... enjoy


Application.StartupPath + @"\container.JPG"



希望它能对您有帮助...



Hope it will help you...



这篇关于如何访问我的解决方案浏览器图像的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

07-23 02:19
查看更多