public void SelectAndFocus() { txtBox.SelectAll(); txtBox.Focus(); Mouse.Capture(this, CaptureMode.SubTree); }