473,474 Members | 1,614 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Files Cut or Copied to the clipboard

If the user Copies or Cuts a file to the clipboard from windows explorer, or
some other application, then pastes the file into my application I want to
copy or move the file into my application's data directory which can be
protected. If the user selected 'Cut' then I'll move the file and if the
user selected 'Copy' then I'll copy the file.

I retreive files from the clipboard as below.

Dim DObj As IDataObject = Clipboard.GetDataObject
If DObj.GetDataPresent(DataFormats.FileDrop) Then
Dim files As String() = _
CType(DObj.GetData(DataFormats.FileDrop), String())
This works fine but now I need to know if the user selected cut or copy when
putting the file(s) on the clipboard so I can decide whether to Move or Copy
the files to my directory.
Thanks for any help
Fred
Mar 5 '07 #1
0 773

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

Similar topics

1
by: tabonni | last post by:
Hi all I want to create an ASP page, which can copy the real PDF files into the clipboard and then the user can paste it in Outlook message as attachments(it's like inserting attachments) My...
5
by: DraguVaso | last post by:
Hi, I'm looking for a way to Copy and Paste Files to the clipboard. I found a lot of articles to copy pieces of text and bitmaps etc, but nog whole files. Whay I need is like you have in...
2
by: Xavier Valdés | last post by:
Hi all, I would like to copy FILES from the clipboard to a desired folder from VB.NET. I was able to copy files (with filedrop data format) to the clipboard but I don't know how to catch this...
7
by: lgbjr | last post by:
Hello All, I¡¯m using a context menu associated with some pictureboxes to provide copy/paste functionality. Copying the image to the clipboard was easy. But pasting an image from the clipboard...
3
by: Dustin Davis | last post by:
Is it possible to trigger an event in VB.NET whenever anything is copied to the clipboard?
7
by: Newbie | last post by:
How do I clear the clipboard in VB.NET 2003? TIA Newbie
1
by: Figmo | last post by:
Wow.....this is darned odd.... I have an app that integrates with other applications. It registers a global hotkey with Windows. When the hotkey executes it sends a CTRL-C to the active...
0
by: Academia | last post by:
I ran Dim Strs As String() = Nothing ....fill Strs with file paths DataO.SetData(DataFormats.FileDrop, True, Strs) Clipboard.SetDataObject(DataO) When I tried to paste into Wordpad I got...
9
by: Peter | last post by:
Does anyone has .NET library to merger RTF files? Thank You Peter
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
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
1
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,...
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...
0
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...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
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 ...

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.