/// <summary>
/// 调用项目资源文件中的资源
/// </summary>
public class LoadPictureUtil
{
public static Bitmap GetResourceBitmap(string imageName)
{
object obj = Properties.Resources.ResourceManager.GetObject(imageName, Properties.Resources.Culture);
return (Bitmap)obj;
}
public static Image GetResourceImage(string imageName)
{
object obj = Properties.Resources.ResourceManager.GetObject(imageName, Properties.Resources.Culture);
return (Image)obj;
}
}
c# 调用项目资源文件中的资源
于 2024-09-08 20:06:19 首次发布