Advertisement
Help Keep Boards Alive. Support us by going ad free today. See here: https://subscriptions.boards.ie/.
If we do not hit our goal we will be forced to close the site.

Current status: https://keepboardsalive.com/

Annual subs are best for most impact. If you are still undecided on going Ad Free - you can also donate using the Paypal Donate option. All contribution helps. Thank you.
https://www.boards.ie/group/1878-subscribers-forum

Private Group for paid up members of Boards.ie. Join the club.

VB clipboard copy question

  • 27-04-2004 10:44AM
    #1
    Registered Users, Registered Users 2 Posts: 1,999 ✭✭✭


    Basically I've greated a form with a textbox and a command button. I'd like to have a command button for copying the text in the textbox to thte clipboard for pasting into other applications(e.g. notepad)

    I've tried this but it doesn't work
    Clipboard.SetText text1.text
    

    it will add the text in the textbox to the clipboard and allow me to paste it but only in the form that I've designed, not outside that app(again, not in notepad)

    Any idea's where I'm screwing up?

    Oh, this isn't a college thing, just something I'm playing around with myself :)... Incase that matters...

    Thanks for your time


Comments

  • Closed Accounts Posts: 11 feakle


    there's no reason for the code not to work, but you need to ensure you clear the clipboard (clipboard.clear) before setting the text.


Advertisement