using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace 颜色和字体
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
private void button1_Click(object sender, EventArgs e)
{
ColorDialog color = new ColorDialog();
color.ShowDialog();
textBox1.ForeColor = color.Color;
}
private void button2_Click(object sender, EventArgs e)
{
FontDialog font = new FontDialog();
font.ShowDialog();
textBox1.Font= font.Font;
}
}
}