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;
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 also try the following which might solve you problem:
This works well with multi-lined textbox.
This method enables you to select all text within the control.
Check this link for more info. http://msdn.microsoft.com/en-us/library/system.windows.forms.textboxbase.selectall.aspx
You can use the built in method for this purpose.