111,129
社区成员
发帖
与我相关
我的任务
分享
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();
drawstring();
}
public void drawstring()
{
Image img = this.BackgroundImage;
Graphics g = Graphics.FromImage(img);
Font yh = new Font("微软雅黑", 12);
Font st = new Font("宋体", 12);
Font f1 = new Font(yh, FontStyle.Underline);
Font f2 = new Font(st, FontStyle.Underline);
g.DrawString("设置宝宝头像", f1, new SolidBrush(ForeColor), new PointF(120, 340));
g.DrawString("设置宝宝头像", f2, new SolidBrush(ForeColor), new PointF(120, 370));
}
}
}