469,641 Members | 1,178 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,641 developers. It's quick & easy.

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

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
3 1850
"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
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
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.

Similar topics

1 post views Thread by Jack | last post: by
6 posts views Thread by laredotornado | last post: by
6 posts views Thread by Rich Raffenetti | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.