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;
// 吴新强于2013年4月10日 桂电 2507
namespace ReplaceWord
{
public partial class Frm_Main : Form
{
public Frm_Main()
{
InitializeComponent();
}
private void Frm_Main_Load(object sender, EventArgs e)
{
}
/// <summary>
/// 首字母转换成大写
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
private void butup_Click(object sender, EventArgs e)
{
string str1 = textBox1.Text.Substring(0, 1);
string str2 = textBox1.Text.Substring(1, textBox1.Text.Length - 1);
label3.Text = str1.ToUpper() + str2;
}
/// <summary>
/// 首字母转换成小
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
private void butlow_Click(object sender, EventArgs e)
{
string str1 = textBox1.Text.Substring(0, 1);
string str2 = textBox1.Text.Substring(1, textBox1.Text.Length - 1);
label3.Text = str1.ToLower() + str2;
}
}
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
// 吴新强于2013年4月10日 桂电 2507
namespace ReplaceWord
{
public partial class Frm_Main : Form
{
public Frm_Main()
{
InitializeComponent();
}
private void Frm_Main_Load(object sender, EventArgs e)
{
}
/// <summary>
/// 首字母转换成大写
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
private void butup_Click(object sender, EventArgs e)
{
string str1 = textBox1.Text.Substring(0, 1);
string str2 = textBox1.Text.Substring(1, textBox1.Text.Length - 1);
label3.Text = str1.ToUpper() + str2;
}
/// <summary>
/// 首字母转换成小
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
private void butlow_Click(object sender, EventArgs e)
{
string str1 = textBox1.Text.Substring(0, 1);
string str2 = textBox1.Text.Substring(1, textBox1.Text.Length - 1);
label3.Text = str1.ToLower() + str2;
}
}
}
实验结果:
作者:smart819819 发表于2013-4-10 0:05:36 原文链接
阅读:126 评论:0 查看评论