Ejemplo n.º 1
0
        internal static void SelectAll(Form1 form)
        {
            WebBrowser             helpWebBrowser      = (WebBrowser)form.splitContainer1.Panel2.Controls["helpWebBrowser"]; //form.helpWebBrowser;
            CustomToolStripTextBox urlToolStripTextBox = form.urlToolStripTextBox;
            TextBox searchTextBox = form.searchTextBox;

            if (urlToolStripTextBox.Focused)
            {
                urlToolStripTextBox.SelectAll();
            }
            else if (searchTextBox.Focused)
            {
                searchTextBox.SelectAll();
            }
            else if (helpWebBrowser.Document != null)
            {
                helpWebBrowser.Document.ExecCommand("SelectAll", false, null);
            }
        }