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

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
6 1249
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

42
by: Edward Diener | last post by:
Coming from the C++ world I can not understand the reason why copy constructors are not used in the .NET framework. A copy constructor creates an object from a copy of another object of the same...
15
by: A | last post by:
Hi, A default copy constructor is created for you when you don't specify one yourself. In such case, the default copy constructor will simply do a bitwise copy for primitives (including...
2
by: Alex | last post by:
Entering the following in the Python shell yields >>> help(dict.copy) Help on method_descriptor: copy(...) D.copy() -> a shallow copy of D >>>
24
by: rdc02271 | last post by:
Hello! Is this too crazy or not? Copy constructor: why can't I copy objects as if they were structs? I have a set of simple objects (no string properties, just integers, doubles) and I have to...
10
by: utab | last post by:
Dear all, So passing and returning a class object is the time when to include the definition of the copy constructor into the class definition. But if we don't call by value or return by value, ...
22
by: clicwar | last post by:
A simple program with operator overloading and copy constructor: #include <iostream> #include <string> using namespace std; class Vector { private: float x,y; public: Vector(float u, float...
3
by: maheshkadam | last post by:
Hi friends I am new to perl so please guide me. I have one application which created backup log file every day.But it appends that file so you can see logs for different day in one file only. ...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
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: 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
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
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...
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.