By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
464,288 Members | 1,175 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 464,288 IT Pros & Developers. It's quick & easy.

keeping highlighted text visible in a form that does not have focus

P: n/a
Hey,

Here is a quick question: I have two forms that I am using, and I need
to highlight the text in Form1 by clicking and dragging (obviously).
So, when I switch to Form2 (making it the focused form), I want to
still be able to see the highlighted text in Form1 even though the form
is not focused. When I click back to Form1, I see the highlighted text,
but if I focus Form2, I don't see the highlighted text. Is there a way
that I can change this? I've googled to no avail =(
Thanks so much!

Jul 28 '06 #1
Share this Question
Share on Google+
3 Replies

P: n/a
"njuneardave" wrote:
Here is a quick question: I have two forms that I am using, and I need
to highlight the text in Form1 by clicking and dragging (obviously).
So, when I switch to Form2 (making it the focused form), I want to
still be able to see the highlighted text in Form1 even though the form
is not focused. When I click back to Form1, I see the highlighted text,
but if I focus Form2, I don't see the highlighted text. Is there a way
that I can change this? I've googled to no avail =(
You didn't specify, but I'm assuming the highlighted text is in a TextBox?
If so, set the TextBox's HideSelection property to false.

--
Timm Martin
Mini-Tools
..NET Components and Windows Software
http://www.mini-tools.com

Jul 28 '06 #2

P: n/a
hey, thanks for the reply! I'm sorry about not specifying, but I am
using an RTB. You hit the nail on the head. Thanks so much for your
help!!!!
Mini-Tools Timm wrote:
"njuneardave" wrote:
Here is a quick question: I have two forms that I am using, and I need
to highlight the text in Form1 by clicking and dragging (obviously).
So, when I switch to Form2 (making it the focused form), I want to
still be able to see the highlighted text in Form1 even though the form
is not focused. When I click back to Form1, I see the highlighted text,
but if I focus Form2, I don't see the highlighted text. Is there a way
that I can change this? I've googled to no avail =(

You didn't specify, but I'm assuming the highlighted text is in a TextBox?
If so, set the TextBox's HideSelection property to false.

--
Timm Martin
Mini-Tools
.NET Components and Windows Software
http://www.mini-tools.com
Jul 28 '06 #3

P: n/a
Hi Dave,

The same HideSelection Property can be applied for RichTextBox as well.

You can use:

Expand|Select|Wrap|Line Numbers
  1. yourRTB.HideSelection  = false;
  2.  
to keep the selected text remains highlighted even the rtb loses focus.

HTH.
Hugh Van.
njuneardave wrote:
hey, thanks for the reply! I'm sorry about not specifying, but I am
using an RTB. You hit the nail on the head. Thanks so much for your
help!!!!
Mini-Tools Timm wrote:
"njuneardave" wrote:
Here is a quick question: I have two forms that I am using, and I need
to highlight the text in Form1 by clicking and dragging (obviously).
So, when I switch to Form2 (making it the focused form), I want to
still be able to see the highlighted text in Form1 even though the form
is not focused. When I click back to Form1, I see the highlighted text,
but if I focus Form2, I don't see the highlighted text. Is there a way
that I can change this? I've googled to no avail =(
You didn't specify, but I'm assuming the highlighted text is in a TextBox?
If so, set the TextBox's HideSelection property to false.

--
Timm Martin
Mini-Tools
.NET Components and Windows Software
http://www.mini-tools.com
Jul 30 '06 #4

This discussion thread is closed

Replies have been disabled for this discussion.