using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
namespace trytry
{
public partial class radiobutton : Form
{
public radiobutton()
{
InitializeComponent();
}
private void button1_Click(object sender, EventArgs e)
{
if (radioButton1.Checked == true)
textBox1.Font = new Font("宋体", textBox1.Font.Size);
if (radioButton2.Checked == true)
textBox1.Font = new Font("楷体", textBox1.Font.Size);
if (radioButton3.Checked == true)
textBox1.Font = new Font("华文行楷", textBox1.Font.Size);
if (radioButton4.Checked == true)
textBox1.ForeColor = Color.Red;
if (radioButton5.Checked == true)
textBox1.ForeColor = Color.Blue;
if (radioButton6.Checked == true)
textBox1.ForeColor = Color.Green;
if (radioButton7.Checked == true)
textBox1.Font = new Font(textBox1.Font.FontFamily, 12);
if (radioButton8.Checked == true)
textBox1.Font = new Font(textBox1.Font.FontFamily, 16);
if (radioButton9.Checked == true)
textBox1.Font = new Font(textBox1.Font.FontFamily, 18);
//textBox1.Text = "欢迎学习C#.NET";
}
}
}