[RESOLVED] [2005] Giving a form focus
I am showing a form with Form.Show and I write a few lines to a textbox on the form with TextBox.AppendText.
While I write the text I am performing a couple small functions on my main form, then I update the textbox. Kind of like a verbose progress dialog.
When the process is done I try to give the textbox focus by using Form.Focus then TextBox.Focus. But the form does not get focus, I can tell this because the toolbar icon for the form does not become depressed (as it would if it had focus.)
So, what am I doing wrong. I assumed the Focus method would give the form focus. That's a pretty safe assumption. So, what is the method that does actually give the form focus.
Re: [2005] Giving a form focus
Re: [2005] Giving a form focus
Well Troy, you've told me before not to assume that you haven't read the relevant MSDN documentation, yet the following quote can be found by reading the documentation for the Focus method of the Form class:
Quote:
Focus is a low-level method intended primarily for custom control authors. Instead, application programmers should use the Select method or the ActiveControl property for child controls, or the Activate method for forms.
Re: [2005] Giving a form focus