C#中绘制文字两套代码
来源:互联网 发布:知乎 金庸哪个最好 编辑:程序博客网 时间:2024/05/18 22:13
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 picture5
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
private void Form1_Paint(object sender, PaintEventArgs e)
{
System.Drawing.Graphics formGraphics = this.CreateGraphics();
// string drawString = "Sample TexT";
//string drawString = "您好!";
//System.Drawing.*/Font drawFont = new Font("Arial",120);
//System.Drawing.SolidBrush drawBrush = new System.Drawing.SolidBrush(System .Drawing .Color .Black );
//formGraphics.DrawString(drawString ,drawFont ,drawBrush ,x ,y );
//drawFont.Dispose(); drawBrush.Dispose (); formGraphics.Dispose();
float x = 50.0f, y = 50.0f;
Font myFont = new Font("Times New Roman",120);
SolidBrush myBrush = new SolidBrush(Color .Red );
formGraphics.DrawString("您好!",myFont,myBrush ,x ,y );
}
}
}
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
namespace picture5
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
private void Form1_Paint(object sender, PaintEventArgs e)
{
System.Drawing.Graphics formGraphics = this.CreateGraphics();
// string drawString = "Sample TexT";
//string drawString = "您好!";
//System.Drawing.*/Font drawFont = new Font("Arial",120);
//System.Drawing.SolidBrush drawBrush = new System.Drawing.SolidBrush(System .Drawing .Color .Black );
//formGraphics.DrawString(drawString ,drawFont ,drawBrush ,x ,y );
//drawFont.Dispose(); drawBrush.Dispose (); formGraphics.Dispose();
float x = 50.0f, y = 50.0f;
Font myFont = new Font("Times New Roman",120);
SolidBrush myBrush = new SolidBrush(Color .Red );
formGraphics.DrawString("您好!",myFont,myBrush ,x ,y );
}
}
}
0 0
- C#中绘制文字两套代码
- C#中使用GDI+绘制辉光效果文字
- C#程序设计(三十一)----绘制文字
- 提取HTML代码中文字的C#函数
- 提取HTML代码中文字的C#函数
- [转]提取HTML代码中文字的C#函数
- 提取HTML代码中文字的C#函数
- 提取HTML代码中文字的C#函数
- 提取HTML代码中文字的C#函数
- 提取HTML代码中文字的C#函数
- 提取HTML代码中文字的C#函数
- 提取HTML代码中文字的C#函数
- 提取HTML代码中文字的C#函数
- 提取HTML代码中文字的C#函数
- 提取HTML代码中文字的C#函数
- C#中绘制多边形
- C#绘制条形码的代码
- OC中数组套数组、字典套字典、数组套字典、字典套数组的代码示例
- android top app 常用组件
- HTTP协议详解
- html+php+js+mysql执行流程
- 一.引用的使用与const关键字
- Windows Socket 网络编程—— 套接字编程原理
- C#中绘制文字两套代码
- Java jdk1.6+ 最简单的环境变量设置方法
- ZOJ-2406
- linux 命令的简单介绍
- 黑马程序员__异常
- 小光棍数
- 编码注意 只有自己能看懂
- 受用一生的做人做事准则
- 解决Android SDK Manager更新、下载速度慢(转载自百度经验)