|
-
Jun 20th, 2000, 08:38 PM
#1
Thread Starter
Addicted Member
Hi
When you open say the Notepad with some text in it and rightclick on the texts a popup menue appears with the Copy section not enabled.
As soon as you select some text and you rightclick again
you see the copy section of the menu is enabled.
How dose windows know when the text is selected?
-
Jun 20th, 2000, 11:50 PM
#2
Create a textbox and a command button and put this code in the command_click event:
Code:
If Text1.SelLength = 0 Then
MsgBox "no text selected"
Else
MsgBox Text1.SelText
End If
In the Windows case, its something like:
Code:
If Text1.SelLength = 0 Then
contextmnu.mnucopy.enabled = False
Else
contextmnu.mnucopy.enabled = True
End If
-
Jun 21st, 2000, 12:29 AM
#3
transcendental analytic
He's talking about getting selected text from an external application
Use  
writing software in C++ is like driving rivets into steel beam with a toothpick.
writing haskell makes your life easier:
reverse (p (6*9)) where p x|x==0=""|True=chr (48+z): p y where (y,z)=divMod x 13
To throw away OOP for low level languages is myopia, to keep OOP is hyperopia. To throw away OOP for a high level language is insight.
-
Jun 22nd, 2000, 05:33 AM
#4
-
Jun 22nd, 2000, 05:48 AM
#5
transcendental analytic
don't you think he knows that already?= also still talking about external applications, youre missleading him.
You have to go for my subclassing sample
Use  
writing software in C++ is like driving rivets into steel beam with a toothpick.
writing haskell makes your life easier:
reverse (p (6*9)) where p x|x==0=""|True=chr (48+z): p y where (y,z)=divMod x 13
To throw away OOP for low level languages is myopia, to keep OOP is hyperopia. To throw away OOP for a high level language is insight.
-
Jun 22nd, 2000, 10:21 AM
#6
Kedaman and Megatron, Mass asked: How does windows know? Not how do you use a context menu on an external application.
-
Jun 23rd, 2000, 06:53 PM
#7
Thread Starter
Addicted Member
Dear Matthew
Thanks but Ked is right, I want to know how to detect if a text is selected in an external application.
It is probably my fault to posr the question the way I did.
I asked how windows know in order to know myself, and I still want to know.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|