<bdo id='kstOR'></bdo><ul id='kstOR'></ul>

<tfoot id='kstOR'></tfoot>
  • <legend id='kstOR'><style id='kstOR'><dir id='kstOR'><q id='kstOR'></q></dir></style></legend>
    <i id='kstOR'><tr id='kstOR'><dt id='kstOR'><q id='kstOR'><span id='kstOR'><b id='kstOR'><form id='kstOR'><ins id='kstOR'></ins><ul id='kstOR'></ul><sub id='kstOR'></sub></form><legend id='kstOR'></legend><bdo id='kstOR'><pre id='kstOR'><center id='kstOR'></center></pre></bdo></b><th id='kstOR'></th></span></q></dt></tr></i><div id='kstOR'><tfoot id='kstOR'></tfoot><dl id='kstOR'><fieldset id='kstOR'></fieldset></dl></div>

    <small id='kstOR'></small><noframes id='kstOR'>

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

        时间:2023-06-09
            <tbody id='uSGn9'></tbody>
          <i id='uSGn9'><tr id='uSGn9'><dt id='uSGn9'><q id='uSGn9'><span id='uSGn9'><b id='uSGn9'><form id='uSGn9'><ins id='uSGn9'></ins><ul id='uSGn9'></ul><sub id='uSGn9'></sub></form><legend id='uSGn9'></legend><bdo id='uSGn9'><pre id='uSGn9'><center id='uSGn9'></center></pre></bdo></b><th id='uSGn9'></th></span></q></dt></tr></i><div id='uSGn9'><tfoot id='uSGn9'></tfoot><dl id='uSGn9'><fieldset id='uSGn9'></fieldset></dl></div>
        • <tfoot id='uSGn9'></tfoot>

          • <bdo id='uSGn9'></bdo><ul id='uSGn9'></ul>

            <small id='uSGn9'></small><noframes id='uSGn9'>

                1. <legend id='uSGn9'><style id='uSGn9'><dir id='uSGn9'><q id='uSGn9'></q></dir></style></legend>

                  本文介绍了如何选择 Windows 窗体文本框中的所有文本?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  我想选择文本框中的所有文本.

                  I want to select all the text that is with in text box.

                  我已经用下面的代码试过了:

                  I've tried this using the code below:

                  textBoxResults.SelectionStart = 0;
                  textBoxResults.SelectionLength = textBoxResults.Text.Length;
                  

                  来源:我从这里得到这个代码 http://msdn.microsoft.com/en-us/library/vstudio/hk09zy8f(v=vs.100).aspx但由于某种原因,它似乎不起作用.

                  Source: I got this code from here http://msdn.microsoft.com/en-us/library/vstudio/hk09zy8f(v=vs.100).aspx but for some reason it doesn't seem to work.

                  推荐答案

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

                  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
                  

                  这篇关于如何选择 Windows 窗体文本框中的所有文本?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                  上一篇:当内容超出范围时在文本框中显示滚动条C# 下一篇:在文本框中捕获 Ctrl + C

                  相关文章

                    <bdo id='1aJsi'></bdo><ul id='1aJsi'></ul>
                  <legend id='1aJsi'><style id='1aJsi'><dir id='1aJsi'><q id='1aJsi'></q></dir></style></legend>
                  <i id='1aJsi'><tr id='1aJsi'><dt id='1aJsi'><q id='1aJsi'><span id='1aJsi'><b id='1aJsi'><form id='1aJsi'><ins id='1aJsi'></ins><ul id='1aJsi'></ul><sub id='1aJsi'></sub></form><legend id='1aJsi'></legend><bdo id='1aJsi'><pre id='1aJsi'><center id='1aJsi'></center></pre></bdo></b><th id='1aJsi'></th></span></q></dt></tr></i><div id='1aJsi'><tfoot id='1aJsi'></tfoot><dl id='1aJsi'><fieldset id='1aJsi'></fieldset></dl></div>

                      <tfoot id='1aJsi'></tfoot>
                    1. <small id='1aJsi'></small><noframes id='1aJsi'>