且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

如何选择 Windows 窗体文本框中的所有文本?

更新时间:2023-12-06 16:19:16

您可以为此使用内置方法.

You can use the built in method for this purpose.

textBoxResults.SelectAll();
textBoxResults.Focus(); //you need to call this to show selection if it doesn't has focus