Click here to Skip to main content
15,901,205 members
Home / Discussions / C#
   

C#

 
GeneralWindows Forms Focus Pin
Alex Leshinsky24-Nov-04 15:10
Alex Leshinsky24-Nov-04 15:10 
GeneralRe: Windows Forms Focus Pin
Alex Leshinsky25-Nov-04 13:46
Alex Leshinsky25-Nov-04 13:46 
GeneralRe: Windows Forms Focus Pin
Jay Shankar25-Nov-04 16:55
Jay Shankar25-Nov-04 16:55 
GeneralRe: Windows Forms Focus Pin
Alex Leshinsky25-Nov-04 21:17
Alex Leshinsky25-Nov-04 21:17 
GeneralRe: Windows Forms Focus Pin
Jay Shankar25-Nov-04 21:26
Jay Shankar25-Nov-04 21:26 
GeneralRe: Windows Forms Focus Pin
Alex Leshinsky26-Nov-04 11:09
Alex Leshinsky26-Nov-04 11:09 
GeneralRestoring Previous Clipboard Data Pin
Jay Shankar24-Nov-04 13:49
Jay Shankar24-Nov-04 13:49 
GeneralRe: Restoring Previous Clipboard Data Pin
Heath Stewart24-Nov-04 14:33
protectorHeath Stewart24-Nov-04 14:33 
The major problem is that the managed IDataObject and OLE clipboard functions (which support drag-n-drop) don't support nearly as much as the OLE IDataObject and related functionality. The best thing you can do is just store save the IDataObject (don't store it in a DataObject; you could loose a lot of data) and restore it later:
IDataObject oldData = Clipboard.GetDataObject();
// Construct your new DataObject and set it, then later...
Clipboard.SetDataObject();
You still run the risk of losing some data for certain applications that may sink events with the OLE implementation of the native IDataObject interface. Even the Office clipboard ring, for example, can't save everything (typically when the media type is TYMED_ISTREAM or TYMED_ISTORAGE because the provider may want to provided data to stream that may no longer be available depending on the connection to an advice sink).

This posting is provided "AS IS" with no warranties, and confers no rights.

Software Design Engineer
Developer Division Sustained Engineering
Microsoft

[My Articles] [My Blog]
GeneralRe: Restoring Previous Clipboard Data Pin
Jay Shankar24-Nov-04 23:04
Jay Shankar24-Nov-04 23:04 
GeneralRe: Restoring Previous Clipboard Data Pin
Heath Stewart25-Nov-04 5:40
protectorHeath Stewart25-Nov-04 5:40 
GeneralRe: Restoring Previous Clipboard Data Pin
Jay Shankar25-Nov-04 16:41
Jay Shankar25-Nov-04 16:41 
GeneralRe: Restoring Previous Clipboard Data Pin
Heath Stewart25-Nov-04 19:44
protectorHeath Stewart25-Nov-04 19:44 
GeneralRe: Restoring Previous Clipboard Data Pin
Jay Shankar25-Nov-04 20:48
Jay Shankar25-Nov-04 20:48 
GeneralRe: Restoring Previous Clipboard Data Pin
Dennis C. Dietrich24-Nov-04 14:35
Dennis C. Dietrich24-Nov-04 14:35 
GeneralRe: Restoring Previous Clipboard Data Pin
Jay Shankar24-Nov-04 23:06
Jay Shankar24-Nov-04 23:06 
GeneralDynamic Classes and Intellisense Pin
tteta@visioncore.com24-Nov-04 13:00
tteta@visioncore.com24-Nov-04 13:00 
GeneralRe: Dynamic Classes and Intellisense Pin
leppie25-Nov-04 1:38
leppie25-Nov-04 1:38 
GeneralRe: Dynamic Classes and Intellisense Pin
Heath Stewart25-Nov-04 19:41
protectorHeath Stewart25-Nov-04 19:41 
General[Easy] Remoting Pin
Snowjim24-Nov-04 12:52
Snowjim24-Nov-04 12:52 
GeneralRe: [Easy] Remoting Pin
Snowjim24-Nov-04 22:36
Snowjim24-Nov-04 22:36 
Generalquickest and easiest way to share data (C dll & .net dll) Pin
Anonymous24-Nov-04 11:03
Anonymous24-Nov-04 11:03 
GeneralRe: quickest and easiest way to share data (C dll & .net dll) Pin
Nick Parker24-Nov-04 11:08
protectorNick Parker24-Nov-04 11:08 
GeneralRe: quickest and easiest way to share data (C dll & .net dll) Pin
asaddsada24-Nov-04 11:53
sussasaddsada24-Nov-04 11:53 
Generalweb services update database using dataset Pin
Don Jonathan24-Nov-04 11:00
sussDon Jonathan24-Nov-04 11:00 
GeneralRe: web services update database using dataset Pin
Heath Stewart24-Nov-04 14:40
protectorHeath Stewart24-Nov-04 14:40 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.