Cut or Copy

  • Thread starter Thread starter Fred
  • Start date Start date
F

Fred

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 work fine but now I need to know if the user selected cut or copy when
putting the file(s) on the clipboard.


Thanks for any help
Fred
 
Fred,

Why not create your own context menu then you can handle the events easier
than going through WndProc to handle the Windows Messages
 
I thought he wanted to know how the data got onto the Clipboard. If
it had been cut or copied from a different application (not the one
he's developing), then I don't know how he could find that out.
Moreover, I don't know why it matters. Who cares HOW it got there?
Maybe there's a reason that I can't foresee that's why I asked him
"Why?" If it's cut or copied from his own application, then of course
he can handle that (say, through a context menu) and record/save which
one they picked.
Regards,
ImageAnalyst


=======================================================
 
I thought he wanted to know how the data got onto the Clipboard. If
it had been cut or copied from a different application (not the one
he's developing), then I don't know how he could find that out.
Moreover, I don't know why it matters. Who cares HOW it got there?
Maybe there's a reason that I can't foresee that's why I asked him
"Why?" If it's cut or copied from his own application, then of course
he can handle that (say, through a context menu) and record/save which
one they picked.
Regards,
ImageAnalyst


=======================================================
 
But also cut/copy still needs to be handled with its shortcuts too because I
iam not 100% sure that if the user clicked CTRL + X/CTRL + C whether it
would be picked up
 
Hi,

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.

Fred
 
Back
Top