Results 1 to 8 of 8

Thread: Clipboard

  1. #1
    Guest
    Most programs allow you to copy the selected the Text. for this reason, you should use SelText instead.
    Code:
    Clipboard.SetText Text1.SelText

  2. #2
    I'm about to be a PowerPoster! Joacim Andersson's Avatar
    Join Date
    Jan 1999
    Location
    Sweden
    Posts
    14,649
    You should clear the Clipboard first.
    Code:
    Clipboard.Clear
    Clipboard.SetText Text1.SelText

  3. #3
    Guest
    The clipbaord is already cleared once you add something so really don't need to clear it.

  4. #4
    Guest
    Megatron, Crazy VIII said he wanted to copy a textbox to the clipboard, not the selected text.

  5. #5
    Guest
    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]

  6. #6
    Guest
    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.

  7. #7
    Guest
    But almost twice as slow.

  8. #8
    I'm about to be a PowerPoster! Joacim Andersson's Avatar
    Join Date
    Jan 1999
    Location
    Sweden
    Posts
    14,649
    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
  •  



Click Here to Expand Forum to Full Width