?? mainform.cs
字號(hào):
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
namespace UsingFont
{
public partial class MainForm : Form
{
public MainForm()
{
InitializeComponent();
}
private void MainForm_Paint(object sender, PaintEventArgs e)
{
// 用明確的字體族名字構(gòu)造一個(gè)字體,大小為25點(diǎn),使用粗斜體樣式
Font f = new Font("Arial", 25.0f, FontStyle.Bold | FontStyle.Italic);
// 構(gòu)造一個(gè)綠色的實(shí)心畫刷
SolidBrush b = new SolidBrush(Color.Green);
// 在屏幕上繪制字符串,左上角坐標(biāo)為(20,20)
e.Graphics.DrawString("Mobile", f, b, 20, 20);
// 釋放畫刷和字體
b.Dispose();
f.Dispose();
}
}
}
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號(hào)
Ctrl + =
減小字號(hào)
Ctrl + -