110,539
社区成员
发帖
与我相关
我的任务
分享
private void textBox1_MouseUp(object sender, MouseEventArgs e)
{
MessageBox.Show(textBox1.SelectedText);
}
textBox1.Text = "AA BB CC DD EE FF";
textBox1.Select(4, 12);//选择文本
textBox1.Select();//选中控件,使得控件获得焦点看到选择效果
private void textBox1_MouseUp(object sender, MouseEventArgs e)
{
if (textBox1.Text.Length > 0)
{
label1.Text = textBox1.SelectedText;
}
}