Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

INCORPORATING WINDOWS CLIPBOARD INTO MY APP

Status
Not open for further replies.

TNN

Programmer
Sep 13, 2000
417
US
Can anyone point me in the direction of how to incorporate the Windows clipboard into my application. That is to be able to copy, cut, and paste to and from the Windows clipboard from my application.

TNN, Tom
TNPAYROLL@AOL.COM [sig]<p>TOM<br><a href=mailto:WWW.TNPAYROLL@AOL.COM>WWW.TNPAYROLL@AOL.COM</a><br>[/sig]
 
Straight out of the MSDN documentation:
[tt]
Private Sub mnuCopy_Click ()
Clipboard.Clear
Clipboard.SetText Text1.SelText
End Sub

Private Sub mnuCut_Click ()
Clipboard.Clear
Clipboard.SetText Text1.SelText Text1.SelText = &quot;&quot;
End Sub

Private Sub mnuPaste_Click ()
Text1.SelText = Clipboard.GetText()
End Sub
[/tt]

These operations work best when performed from a menu selection (the text box can retain focus).

Check MSDN for the methods for dealing with other types of clipboard data (bitmaps, etc.)

Good luck!
[sig]<p> <br><a href=mailto: > </a><br><a href= plain black box</a><br>"Suffice it to say that adding disk drives and a disk operating system to a personal microcomputer is guaranteed to increase its power dramatically."<br>
<u><b>CP/M and the Personal Computer</u></b>[/sig]
 
Thank You Alt255,
I looked in MSDN but never found what you are showing me.
If you see this,will you let me know where you found this in MSDN.
Your help is appreciated.
TNN, Tom [sig]<p>TOM<br><a href=mailto:WWW.TNPAYROLL@AOL.COM>WWW.TNPAYROLL@AOL.COM</a><br>[/sig]
 
Never mind Alt255. I found it in MSDN. Thank you for pointing me.
TNN, Tom [sig]<p>TOM<br><a href=mailto:WWW.TNPAYROLL@AOL.COM>WWW.TNPAYROLL@AOL.COM</a><br>[/sig]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top