473,385 Members | 1,359 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,385 software developers and data experts.

how to get the source file reference data from the clipboard in .Net

TC
Hello,

I am familiar with obtaining source file reference material from the system
clipboard using the old Win32 API.

For example, copy an Excel chart onto the clipboard and goto Word. Under,
Edit & PasteSpecial, there is a label called "Source:" which will contain
the file path, etc.

How can one obtain the source file reference material utilizing .Net
technology?

Thanks & Regards,

TC
Jul 21 '05 #1
5 2654
Hi TC,

Two links, one of them is a start link which leads you to all kinds of other
posibilities with copy paste cut and the drag functions.

http://msdn.microsoft.com/library/de...ardSupport.asp

http://msdn.microsoft.com/library/de...mpdragdrop.asp

I hope this helps a little bit?

Cor
Jul 21 '05 #2
TC
Hey Cor,

Thanks for the effort, but no, this doesn't help.

It's not "drag & drop" that I'm looking for.

I need assistance with the very specific task of retrieving source file
information from the clipboard and whether or not this is possible WITHOUT
the Win32 API under the .Net platform.

Regards,

Todd


"Cor Ligthert" <no**********@planet.nl> wrote in message
news:Or**************@TK2MSFTNGP11.phx.gbl...
Hi TC,

Two links, one of them is a start link which leads you to all kinds of other posibilities with copy paste cut and the drag functions.

http://msdn.microsoft.com/library/de...ardSupport.asp
http://msdn.microsoft.com/library/de...mpdragdrop.asp
I hope this helps a little bit?

Cor

Jul 21 '05 #3
Hi TC,
I need assistance with the very specific task of retrieving source file
information from the clipboard and whether or not this is possible WITHOUT
the Win32 API under the .Net platform.


That is on the first link I sended, the second is useless for you I see now.

When you start with that get clipboard data you can come on pages like this
one

http://msdn.microsoft.com/library/de...bjectTopic.asp

Cor
Jul 21 '05 #4
TC
Hey Jerry,

Thanks for the note.

Actually, you can do something about as I keep mentioning.

There are Win32 APIs that one can use to acquire the source reference
material of COM-related files.

If you look at the "PasteSpecial" dialog, there is a label called "Source"
which will display the full path of a file if it is available.

I know that one can gain access to this material because I have code under
VB6 that does just that.

However, the question I am seeking an answer to is:

Can one gain access to the source reference material under the .Net
Framework without the use of Win32 APIs?

Thanks & Regards,

Todd

"Jerry Pisk" <je******@hotmail.com> wrote in message
news:un**************@TK2MSFTNGP11.phx.gbl...
I think you do not fully understand how clipboard works. What you see when
you select Paste Special... is the various formats of data stored in the
clipboard. You can get a list of those formats using the
IDataObject.GetFormats method and then pick the one that represents the data you need and use it when calling IDataObject.GetData. But if it's not there (such as when you copy data from notepad) then it's not there and there's
nothing you can do about it.

Jerry

"TC" <ge**********@yahoo.com> wrote in message
news:ej**************@tk2msftngp13.phx.gbl...
Hey Cor,

OK. There seems to be some confusion regarding what I am looking for.

I know & understand how to get the data from the clipboard.

For example, if I have a bitmap representing an Excel chart, I can check

for
the bitmap dataformat and then insert the object accordingly.

However, inserting the object does not insert its source reference.

COM components communicate this information, though and if one goes to MS
Word after putting an Excel chart on the clipboard and then uses the "Edit
Paste Special" dialog, one will see the source reference represented.

This source reference is obtainable via the Win32 API.

Is there a way to access this material in .Net without the use of the

Win32
API?

Thanks & Regards,

Todd


"Cor Ligthert" <no**********@planet.nl> wrote in message
news:%2****************@TK2MSFTNGP11.phx.gbl...
Hi TC,

> I need assistance with the very specific task of retrieving source file > information from the clipboard and whether or not this is possible

WITHOUT
> the Win32 API under the .Net platform.

That is on the first link I sended, the second is useless for you I see now.

When you start with that get clipboard data you can come on pages like

this
one

http://msdn.microsoft.com/library/de...bjectTopic.asp
Cor



Jul 21 '05 #5
Yes, if it is there. Didn't you read my post? You need to get the list of
available formats (source will be one of them) and then get the data.

Jerry

"TC" <ge**********@yahoo.com> wrote in message
news:u3**************@TK2MSFTNGP11.phx.gbl...
Hey Jerry,

Thanks for the note.

Actually, you can do something about as I keep mentioning.

There are Win32 APIs that one can use to acquire the source reference
material of COM-related files.

If you look at the "PasteSpecial" dialog, there is a label called "Source"
which will display the full path of a file if it is available.

I know that one can gain access to this material because I have code under
VB6 that does just that.

However, the question I am seeking an answer to is:

Can one gain access to the source reference material under the .Net
Framework without the use of Win32 APIs?

Thanks & Regards,

Todd

"Jerry Pisk" <je******@hotmail.com> wrote in message
news:un**************@TK2MSFTNGP11.phx.gbl...
I think you do not fully understand how clipboard works. What you see when
you select Paste Special... is the various formats of data stored in the
clipboard. You can get a list of those formats using the
IDataObject.GetFormats method and then pick the one that represents the

data
you need and use it when calling IDataObject.GetData. But if it's not

there
(such as when you copy data from notepad) then it's not there and there's nothing you can do about it.

Jerry

"TC" <ge**********@yahoo.com> wrote in message
news:ej**************@tk2msftngp13.phx.gbl...
Hey Cor,

OK. There seems to be some confusion regarding what I am looking for.

I know & understand how to get the data from the clipboard.

For example, if I have a bitmap representing an Excel chart, I can check
for
the bitmap dataformat and then insert the object accordingly.

However, inserting the object does not insert its source reference.

COM components communicate this information, though and if one goes to

MS Word after putting an Excel chart on the clipboard and then uses the "Edit
Paste Special" dialog, one will see the source reference represented.

This source reference is obtainable via the Win32 API.

Is there a way to access this material in .Net without the use of the

Win32
API?

Thanks & Regards,

Todd


"Cor Ligthert" <no**********@planet.nl> wrote in message
news:%2****************@TK2MSFTNGP11.phx.gbl...
> Hi TC,
>
> > I need assistance with the very specific task of retrieving source

file
> > information from the clipboard and whether or not this is possible
WITHOUT
> > the Win32 API under the .Net platform.
>
> That is on the first link I sended, the second is useless for you I see now.
>
> When you start with that get clipboard data you can come on pages
like this
> one
>
>

http://msdn.microsoft.com/library/de...bjectTopic.asp
>
> Cor
>
>



Jul 21 '05 #6

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

Similar topics

0
by: TC | last post by:
Hello, Here is what I'm trying to do: -- Make sure both MS Excel and MS Word are running -- Create an Excel chart -- Save the Excel file -- Copy the Excel chart onto the clipboard using Ctrl...
5
by: TC | last post by:
Hello, Here is what I'm trying to do: -- Make sure both MS Excel and MS Word are running -- Create an Excel chart -- Save the Excel file -- Copy the Excel chart onto the clipboard using Ctrl...
7
by: TC | last post by:
Hello, I am familiar with obtaining source file reference material from the system clipboard using the old Win32 API. For example, copy an Excel chart onto the clipboard and goto Word. Under,...
8
by: John Smith | last post by:
Hi folks, I know how to place text into the user's clipboard: Clipboard.SetDataObject("My Copied Text"); but how do I place a file in there? So, if I have a file C:\test.txt, how can I place...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
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: 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...

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.