467,161 Members | 974 Online
Bytes | Developer Community
Ask Question

Home New Posts Topics Members FAQ

Post your question to a community of 467,161 developers. It's quick & easy.

Cut or Copy

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


Mar 2 '07 #1
  • viewed: 1026
Share:
6 Replies
Fred:
Why?
Regards,
================================================== ====
On Mar 1, 10:55 pm, "Fred" <leavemealone@homewrote:
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

Mar 2 '07 #2
Fred,

Why not create your own context menu then you can handle the events easier
than going through WndProc to handle the Windows Messages

--
Newbie Coder
(It's just a name)
Mar 2 '07 #3
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
================================================== =====
On Mar 2, 10:41 am, "Newbie Coder" <newbieco...@spammeplease.com>
wrote:
Fred,

Why not create your own context menu then you can handle the events easier
than going through WndProc to handle the Windows Messages

--
Newbie Coder
(It's just a name)

Mar 2 '07 #4
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
================================================== =====
On Mar 2, 10:41 am, "Newbie Coder" <newbieco...@spammeplease.com>
wrote:
Fred,

Why not create your own context menu then you can handle the events easier
than going through WndProc to handle the Windows Messages

--
Newbie Coder
(It's just a name)

Mar 2 '07 #5
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

--
Newbie Coder
(It's just a name)
Mar 2 '07 #6
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

"ImageAnalyst" <im**********@mailinator.comwrote in message
news:11**********************@z35g2000cwz.googlegr oups.com...
Fred:
Why?
Regards,
================================================== ====
On Mar 1, 10:55 pm, "Fred" <leavemealone@homewrote:
>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


Mar 4 '07 #7

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

42 posts views Thread by Edward Diener | last post: by
15 posts views Thread by A | last post: by
10 posts views Thread by utab | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.