更新:2007 年 11 月
可以重写窗体的 OnPaint 方法以绘制一个图像作为窗体的背景。
在窗体上绘制背景图像
- 重写窗体的 OnPaint 方法 
- 从设备上的外部文件或程序集中的嵌入式资源获取图像。 
- 使用 PaintEventArgs 的 Graphics 属性的 Graphics 对象绘制该图像。使用由窗体的 ClientRectangle 属性指定的尺寸 
示例
此示例使用一个编译为嵌入式资源的图像文件作为窗体的背景图像。
Protected Overrides Sub OnPaint(e As PaintEventArgs)
    ' Get image compiled as an embedded resource.
    Dim asm As Assembly = Assembly.GetExecutingAssembly()
    Dim backGroundImage As New Bitmap(asm.GetManifestResourceStream("mypicture.bmp"))
    e.Graphics.DrawImage(backgroundImage, Me.ClientRectangle, _
        New Rectangle(0, 0, backgroundImage.Width, backgroundImage.Height), _
        GraphicsUnit.Pixel)
End Sub   
protected override void OnPaint(PaintEventArgs e)
{        
    // Get image compiled as an embedded resource.
    Assembly asm = Assembly.GetExecutingAssembly();
    Bitmap backgroundImage = new Bitmap(asm.GetManifestResourceStream("mypicture.jpg"));
    e.Graphics.DrawImage(backgroundImage, this.ClientRectangle,
        new Rectangle(0,0, backgroundImage.Width, backgroundImage.Height),
        GraphicsUnit.Pixel);
}
编译代码
此示例需要引用下面的命名空间: