473,406 Members | 2,894 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,406 software developers and data experts.

Store clipboard data

My app has to temporarily use the clipboard - and while doing so, it would
delete any existing data which the user has copied (possibly from other
applications).

What I want to do is temporarily store (if to file then by serializing) the
clipboard data, use the clipboard, and the restore the clipboard with the
temp data.

The question is: apps like Word store up to 16 different formats at once on
the clipboard - how do I deal with that? If it was just text, image, audio, I
could store it appropriately, but how to store custom data formats?

Any help would be greatly appreciated.

Thanks,
Dax
--
Dax Pandhi
www.nukeation.com
Jul 25 '05 #1
1 1793
Nukeation wrote:
Any help would be greatly appreciated.


I'd refer you to the clipboard class in the .NET framework and the
GetDataObject and SetDataObject methods.

From the VS 2003 help:

"Because the data type of the object returned from the clipboard can
vary, (GetDataObject) returns the data in an IDataObject. Then you can
use methods of the IDataObject interface to extract the data in its
proper data type."

Hope that helps.

--
Derek Davidson
Take the S4N Poll
http://s4n.no-ip.biz/s4npoll/intro.aspx
Poll active until 31 July 2005
Jul 27 '05 #2

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

Similar topics

8
by: LG | last post by:
Just have a question with regards to the clipboard, and how to read what other applications (Adobe InDesignCS) place in the clipboard. I am currently in the process of creating a booklet from a...
2
by: Gey-Hong Gweon | last post by:
Is there a way to copy a PIL image to windows clipboard (as a dib image or a bitmap, I suppose)? What I would like to accomplish is to do a fast copy and paste of images from my python...
1
by: emma middlebrook | last post by:
Hi Needed a title like that to get you reading :-) Having never programmed for the Clipboard before, I expected it to work as follows: multiple data formats can be supported by just storing...
0
by: Christopher | last post by:
Hello, First, I appologize for the length but I want to get all the facts down so as not to waste any time :) I'm trying to allow the user of my C# app to copy a DataGrid full of double values...
2
by: Mészáros Tamás | last post by:
Hi! Can I save and restore the content of the clipboard without dealing with the format it stores? I use the clipboard for data exchange between applications (this is the only way), and I would...
4
by: Joshua Campbell | last post by:
I am working on an application that needs to parse out data that has been copied into the clipboard. My first questions are how can I detect if the clipboard is empty, and how can I empty the...
1
by: Nukeation | last post by:
My app has to temporarily use the clipboard - and while doing so, it would delete any existing data which the user has copied (possibly from other applications). What I want to do is temporarily...
1
by: Robert Bravery | last post by:
Hi all, I'm using the following code to copy data from XL to the clipboard to be later usied in a datatable range = objSheet.get_Range("A22", "aa100"); range.Copy(Missing.Value).ToString();...
15
by: Peter Duniho | last post by:
I'm trying to use .NET and C# to draw a metafile copied to the clipboard by another application (Word 2003 in this case, but it shouldn't matter). I naively thought that I'd be able to use the...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
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:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
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
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

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.