[DllImport("user32",EntryPoint = "HideCaret")]
private static extern bool HideCaret(IntPtr hWnd); //需引入命名空间using System.Runtime.InteropServices;
private void Txt_RecInfo_MouseDown(object sender, MouseEventArgs e)
{
HideCaret((sender as TextBox).Handle);
}
还有一种方式就是设置其他控件 pl_1.Focus();

8460

被折叠的 条评论
为什么被折叠?



