C# winform窗体换皮肤

文章目录

在winform项目开发中,有时候需要更好窗体颜色。本文就详细介绍实现过程

知识点

Image

为源自 Bitmap 和 Metafile 的类提供功能的抽象基类。

csharp 复制代码
private void ImageExampleForm_Paint(object sender, PaintEventArgs e)
{         
    // Create image.
    Image newImage = Image.FromFile("SampImag.jpg");
             
    // Create Point for upper-left corner of image.
    Point ulCorner = new Point(100, 100);
             
    // Draw image to screen.
    e.Graphics.DrawImage(newImage, ulCorner);
}

方法

  • FromFile
    从指定的文件创建 Image。
相关推荐
Xin_ye1008612 小时前
C# 零基础到精通教程 - 第七章:面向对象编程(入门)——类与对象
开发语言·c#
rockey62712 小时前
AScript异步执行与await关键字
c#·.net·script·eval·expression·异步执行·动态脚本
程序leo源14 小时前
Qt窗口详解
开发语言·数据库·c++·qt·青少年编程·c#
月巴月巴白勺合鸟月半18 小时前
质本洁来还洁去,强于污淖陷文本
c#
Xin_ye1008619 小时前
C# 零基础到精通教程 - 第八章:面向对象编程(进阶)——继承与多态
开发语言·c#
asdzx6720 小时前
使用 C# 打印 Excel 文档(详细教程)
c#·excel
伽蓝_游戏1 天前
第四章:AssetBundle 核心机制与文件结构
unity·c#·游戏引擎·游戏程序
2501_930707781 天前
使用C#代码拆分 PowerPoint 演示文稿
开发语言·c#·powerpoint
SenChien1 天前
C#学习笔记-入门篇
笔记·学习·c#·rider
诙_1 天前
由C++速通C#
开发语言·c#