473,408 Members | 2,025 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,408 software developers and data experts.

How to serialize a dataObject

Does anyone know how to serialize a dataObject. Is it possible?

What I try to do in my application is to allow user drag and drop objects
onto a toolbox type of thing, and try to preserve these objects (DataObject)
when user quit the application, so they could drop they back to an editor
leter.

I can successfully serialize the inner data of dataObject after
GetData(formatType), but by converting to a specific format type, I lose
some useful information. For example, if I try to get "HTML Format" from the
dataObject, it deson't recognize unicode. So I really want to preserve the
dataObject.

Any suggestion will be appreciated.

-Jinlin
Nov 16 '05 #1
1 3535
Jinlin,

You won't be able to do this. The DataObject is not marked as
Serializable, nor does it look like it will give you access to the internal
data. Even if you could get at the internal data, the bytes themselves
might not be representative of everything on the clipboard (it might just be
a pointer to something else, perhaps).

If this is for your application specifically, I would recommend
serializing the objects after they come from the DataObject, not the
DataObject itself.

Hope this helps.
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

"Jinlin" <ji*********@unisys.com> wrote in message
news:%2****************@TK2MSFTNGP12.phx.gbl...
Does anyone know how to serialize a dataObject. Is it possible?

What I try to do in my application is to allow user drag and drop objects
onto a toolbox type of thing, and try to preserve these objects (DataObject) when user quit the application, so they could drop they back to an editor
leter.

I can successfully serialize the inner data of dataObject after
GetData(formatType), but by converting to a specific format type, I lose
some useful information. For example, if I try to get "HTML Format" from the dataObject, it deson't recognize unicode. So I really want to preserve the
dataObject.

Any suggestion will be appreciated.

-Jinlin

Nov 16 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Christian Decker | last post by:
Hi, I'm pretty new to Object Oriented design in PHP (although I'm using PHP since a long time, and I also code with Java, so this is not a problem for me) and I need some help with...
0
by: Manoj Nair | last post by:
I am a newbie so forgive any stupid Q's. Reqt : I have a java data object and I need to have a getter method in it which will return me a XML file for that instance. Eg: I have a class...
0
by: Jim Douglas | last post by:
Are other's using the .NET stuff like this? Do you use the Dataobject or include the data access stuff in the BusinessObject? Does everyone use storedprocedures? Thanks! Jim Douglas...
5
by: David Sworder | last post by:
Hi, I've created a UserControl-derived class called MyUserControl that is able to persist and subsequently reload its state. It exposes two methods as follows: public void Serialize(Stream...
1
by: Max Sandman | last post by:
I need to import and export CSV files. Before I head off the create my own CSV parser (got the link to Falafel's articles), is there a way to use the DataObject class in this process? I don't want...
0
by: New World Order Pigs | last post by:
I am trying to use dataobjects class to convert rtf to html and back to rtf again and I can't get it to work. Below is the code... IDataObject data = new DataObject();...
7
by: **Developer** | last post by:
Although the code is VB I believe the question is OOP I tried the VB NG but no answer. I suspect the c# programmer is more apt to be aware of these kinds of subtleties so I', trying here. I do...
4
by: Bob Staheli | last post by:
The .Net DataObject class implements the COM/OLE IDataObject interface , so how do I get it. I have tried this, but it does not work : // Declare the COM/OLE IDataObject interface public...
4
by: =?Utf-8?B?Qnlyb24=?= | last post by:
When I try to serialize an instance of the LocationCell below (note Building field) I get an error in the reflection attempt. If I remove the _Building field it serializes fine. I tried renaming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.