|
-
Sep 9th, 2000, 08:26 AM
#1
Most programs allow you to copy the selected the Text. for this reason, you should use SelText instead.
Code:
Clipboard.SetText Text1.SelText
-
Sep 9th, 2000, 10:56 AM
#2
You should clear the Clipboard first.
Code:
Clipboard.Clear
Clipboard.SetText Text1.SelText
-
Sep 9th, 2000, 12:06 PM
#3
The clipbaord is already cleared once you add something so really don't need to clear it.
-
Sep 9th, 2000, 12:09 PM
#4
Megatron, Crazy VIII said he wanted to copy a textbox to the clipboard, not the selected text.
-
Sep 9th, 2000, 12:13 PM
#5
Using SelText will copy the seleted text (if any), however, if no text is selected, then this will copy the whole text.
Code:
If Text1.SelText = "" Then
Clipboard.SetText Text1
Else
Clipboard.SetText Text1.SelText
End If
[Edited by Megatron on 09-09-2000 at 01:18 PM]
-
Sep 9th, 2000, 12:23 PM
#6
I know that. But he wants the whole textbox copied.
Have it your way.
Code:
Text1.SelStart = 0
Text1.SelLength = Len(Text1.Text)
Clipboard.SetText Text1.SelText
My way's shorter though.
-
Sep 9th, 2000, 12:32 PM
#7
But almost twice as slow.
-
Sep 9th, 2000, 04:16 PM
#8
Originally posted by Megatron
The clipbaord is already cleared once you add something so really don't need to clear it.
Nope, not really! You don't actually have to clear the clipboard when you're using text, but try to put a picture on the clipboard without clearing it first!
That is why I always recommend clearing the Clipboard object before putting anything in it.
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
|