当前位置:首页 > 开发 > 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# 获取文件图标

string file = @"C:\Windows\exp...

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

static void Main() { Thread thre...

C# double转为string并保留两位小数

在 C# 中,可以使用多种方式将 double 类型的数据转换为 string 类型并保留两位小数,...

C# Browsable(bool)

在编程中(比如常见的 C# 语言在开发 Windows Forms 等应用程序时),Browsabl...

C# 类接口

定义接口是一种抽象类型,它定义了一组方法签名(方法名称、参数列表和返回类型),但没有方法体。接口用于...

c# Invalidate、Refresh、Refreshitem、Refreshitems的功能

Invalidate方法功能概述Invalidate方法主要用于使控件的特定区域(整个控件或部分区域...