|
web
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
VB.NET - How do I set and keep data in the clipboard?This is how I setup clipboard in my application:
dim template as string = "put to clipboard" Clipboard.SetDataObject(template) And it all works like a charm until I close my program. As soon as the program is closed I lose the clipboard as well. Is there any way to keep the data in clipboard even that my application is already closed? Please let me know, this is crucial for my software functionality and I spent lot of time already trying to figure it out. Martin Martin,
There is an overloaded version of SetDataObject that lets you specify whether or not the data should remain in the clipboard after your app closes: Clipboard.SetDataObject(template, True) Kerry Moorman Show quoteHide quote "MARTIN LANNY" wrote: > This is how I setup clipboard in my application: > > dim template as string = "put to clipboard" > Clipboard.SetDataObject(template) > > And it all works like a charm until I close my program. > As soon as the program is closed I lose the clipboard as well. > > Is there any way to keep the data in clipboard even that my application > is already closed? > > Please let me know, this is crucial for my software functionality and I > spent lot of time already trying to figure it out. > > Martin > > It is that easy...from ms help
Parameters data The data to place on the clipboard. copy true if you want data to remain on the clipboard after this application exits; otherwise, false.
Automatic type casting?
Visual Basic 2005 CreateFile Crash in VB.NET 2005 Windows Shell Integration: how? Read mail from exchange 2003 Problems with FileAccess and PcitoreBox Insert related tables into database. Automated Refactoring w/ CodeDom and VBCodeProvider... File is busy Outlook Add-In: msoControlEdit: Textbox loses text when losing focus |
|||||||||||||||||||||||