当前位置:首页 > 开发 > C# > 正文内容

C# pictureBox 设置图片的几种方式

C#5年前 (2021-08-25)
            string imUrl = @"http://pythonopen.com/1.ico";
            this.pictureBox1.ImageLocation  = imUrl;
            string imPath = @"D:\WaltzTool\驻留\图标\彩虹头像\favicon_32x.ico";
            this.pictureBox1.ImageLocation = imPath;
            string imPath = @"D:\WaltzTool\驻留\图标\彩虹头像\favicon_32x.ico";
            this.pictureBox1.Image = Image.FromFile(imPath);
            this.pictureBox1.Image = CCon_20210821.Properties.Resources.bilibili;


转载请注明出处。

本文链接:http://pythonopen.com/?id=160

相关文章

C# 跳出foreach循环

在 C# 中,如果你想在 foreach 循环内部提前跳出当前这一轮循环,继续执行下一轮循环,可以使...

C# 缩减代码量的一些方式

static void Main() { Thread thre...

C# [OnPaint]和[OnPaintBackground]的区别

OnPaint和OnPaintBackground的主要功能区别OnPaint:OnPaint方法主...

C# Byte[]转为Bitmap

在 C# 中,可以使用System.Drawing命名空间下的相关类将byte[]类型的数据转换为B...

C# MemoryStream转为Image

        //...

C# i++和++i的区别

核心区别操作顺序            ...