I am unable to add a button to the clipboard. This is
required to do drag and drop of the object - button.
I am able to add a string to the clipboard. The following
is a summary of my steps. Any help greatly appreciated.
Button button2 = new Button();
DataObject data = new DataObject();
data.SetData("myButton", button2);
Clipboard.SetDataObject(data, true);
IDataObject data = Clipboard.GetDataObject();
object obj = data.GetData("myFormat"); // returns obj
== null
Button btn = (Button)data.GetData("myFormat"); //
returns btn == null
btn = (Button)data.GetData(typeof(Button)); // returns
btn == null
Thanks...