HighTechTalks DotNet Forums  

Clipboard Persistence

Dotnet Framework (WinForms) microsoft.public.dotnet.framework.windowsforms


Discuss Clipboard Persistence in the Dotnet Framework (WinForms) forum.



Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old   
Scott W
 
Posts: n/a

Default Clipboard Persistence - 07-01-2005 , 09:25 AM






We are adding clipboard support for an exception handler we use, so users can
paste the information about the exception into an email or document. I am
using the following method:

Clipboard.SetDataObject(sb.ToString()); (after building the stringbuilder of
course)

The problem is, once the application is closed, the clipboard is emptied.
Is there any way to make it persistent? Do I need to use the WIndows API
instead of the .NET?

Thanks in advance for the help.

Reply With Quote
  #2  
Old   
Rodger Constandse
 
Posts: n/a

Default Re: Clipboard Persistence - 07-01-2005 , 12:43 PM






Hi,

Use the overload of the SetDataObject method passing true as the 2nd argument:

Clipboard.SetDataObject(sb.ToString(),true);

See MSDN documentation for this method.

Best regards,

Rodger

Sequence Diagram Editor - Draw sequence diagrams faster
<http://www.SequenceDiagramEditor.com>

Scott W wrote:
Quote:
We are adding clipboard support for an exception handler we use, so users can
paste the information about the exception into an email or document. I am
using the following method:

Clipboard.SetDataObject(sb.ToString()); (after building the stringbuilder of
course)

The problem is, once the application is closed, the clipboard is emptied.
Is there any way to make it persistent? Do I need to use the WIndows API
instead of the .NET?

Thanks in advance for the help.

Reply With Quote
  #3  
Old   
Scott W
 
Posts: n/a

Default Re: Clipboard Persistence - 07-08-2005 , 11:30 AM



Thanks, don't know how I missed that in the documentation!

"Rodger Constandse" wrote:

Quote:
Hi,

Use the overload of the SetDataObject method passing true as the 2nd argument:

Clipboard.SetDataObject(sb.ToString(),true);

See MSDN documentation for this method.

Best regards,

Rodger

Sequence Diagram Editor - Draw sequence diagrams faster
http://www.SequenceDiagramEditor.com

Scott W wrote:
We are adding clipboard support for an exception handler we use, so users can
paste the information about the exception into an email or document. I am
using the following method:

Clipboard.SetDataObject(sb.ToString()); (after building the stringbuilder of
course)

The problem is, once the application is closed, the clipboard is emptied.
Is there any way to make it persistent? Do I need to use the WIndows API
instead of the .NET?

Thanks in advance for the help.


Reply With Quote
Reply




Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.