16,554
社区成员
发帖
与我相关
我的任务
分享
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
namespace WindowsFormsApplication1
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
private Bitmap bmp = new Bitmap(@"C:\WINDOWS\Web\Wallpaper\Bliss.bmp");
private void Form1_Load(object sender, EventArgs e)
{
Graphics g = Graphics.FromImage(bmp);
g.DrawString("Hello World!", this.Font, Brushes.Black, new PointF() { X = 20, Y = 20 });
}
private void pictureBox1_Paint(object sender, PaintEventArgs e)
{
pictureBox1.Image = bmp;
}
}
}