111,120
社区成员
发帖
与我相关
我的任务
分享
//设置光标位置
private void button1_Click(object sender, EventArgs e)
{
textBox1.SelectionStart = 2;
textBox1.Focus();
}
// 取得光标位置
private void button2_Click(object sender, EventArgs e)
{
MessageBox.Show(textBox1.SelectionStart.ToString());
}