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 1 1819
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 This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
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 database, and I
need the data to be laid out in a tabular format, and set out in a specific
way. At the current point in time, I am copy/pasting the raw text from the
database into a table layout in InDesign. What I was thinking is that if I
could...
|
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 application to a windows application such as
powerpoint. A slower way is to use files, which is what I am doing at
the moment.
Thanks in advance.
|
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 the data, keyed by the format name. After the application that
has placed a custom format into the Clipboard has closed, the data
should still be there and later, after another instance of that
application has been created, you should still be able...
|
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 to the clipboard (via ctrl-C, edit->copy, etc).
They can then paste these values wherever (but in particular, excel).
I've searched the web fairly exhaustively and cannot find an answer to
this. Every time someone asks, somone answers with the...
|
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 like to keep the
previous content of the clipboard. Any examples I've found build on the
format of the data, but I can't now in advance, what type of data on the
clipboard will be. I can't even save and restore a part of simple
formatted text...
| |
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 clipboard? I tried the code
below, but it didn't seem to tell me if the clipboard was empty.
If Clipboard.GetDataObject() Is Nothing Then
MessageBox.Show("Clipboard is empty")
Else
Dim txtdata As IDataObject = Clipboard.GetDataObject()
If...
|
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 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...
|
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();
xlcopydata = Clipboard.GetData(DataFormats.Text).ToString();
Clipboard.Clear();
But when I issue a excelapplication quite I get an dialog saying that I have
large amounts of data on the clipboard, do I want to keep it etc etc
|
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 Clipboard class to get an
EnhancedMetafile or MetafilePict object from the Clipboard, use that to
create a new Metafile object, and then draw that Metafile object using
Graphics.DrawImage.
It doesn't seem to be that simple.
|
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look !
Part I. Meaning of...
|
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
| |
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own....
Now, this would greatly impact the work of software developers. The idea...
|
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules.
He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms.
Adolph will...
|
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 then checking html paragraph one by one.
At the time of converting from word file to html my equations which are in the word document file was convert into image.
Globals.ThisAddIn.Application.ActiveDocument.Select();...
|
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols.
I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
| |
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |