G
Guest
I read a book, Programming Microsoft WINDOWS with C# by Charles Petzold, which shows ho
to set or get string and image to and from Clipboard. It says even a button object can be set or go
to and from a Clipboard
I defined a class, e.g
public class AB
string s
int i
public ABC(
s="ABC"
i=1
the
ABC a=new ABC()
Clipboard.SetDataObject(a)
IDataObject data=Clipboard.GetDataObject()
ABC b=null
if (data.GetDataPresent(typeof(ABC))) // it returns true, that mens the data object is in clipboar
b=(ABC)data.GetDate(typeof(ABC)); // but after the statement, b is still nul
Do you know what is problem
In our app, we need to set a complex class (UI) to Clipboard. I'm not sure if clipboard works fo
any kind object. Please advise
Thank
Keit
to set or get string and image to and from Clipboard. It says even a button object can be set or go
to and from a Clipboard
I defined a class, e.g
public class AB
string s
int i
public ABC(
s="ABC"
i=1
the
ABC a=new ABC()
Clipboard.SetDataObject(a)
IDataObject data=Clipboard.GetDataObject()
ABC b=null
if (data.GetDataPresent(typeof(ABC))) // it returns true, that mens the data object is in clipboar
b=(ABC)data.GetDate(typeof(ABC)); // but after the statement, b is still nul
Do you know what is problem
In our app, we need to set a complex class (UI) to Clipboard. I'm not sure if clipboard works fo
any kind object. Please advise
Thank
Keit