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

Question concerning DoDragDrop method

Hello,

I have a control and I have already set up drag-n-drop functionality.
Everything works fine when I drag and drop data.

Now, I want to support copy-paste as well so what I did was hook up the
controls KeyDown event and in that method I did this:

if (e.Control && e.KeyCode == Keys.V)
{
IDataObject data = System.Windows.Forms.Clipboard.GetDataObject();
_myControl.DoDragDrop(data,DragDropEffects.Copy);
}

I want the same thing to occur whether the user drag-n-dropped or
copy-pasted.

In the DragDrop event of my control, I show a messagebox with some info on
what was dropped. It pops up fine when I drag-n-drop data. However, if I
copy-paste data, nothing happens until I move my mouse. I hit Ctrl-V and it
seems like it didn't do anyhting, but once I move my mouse the message box
pops up.

Does anyone have an idea as to what can be causing this behavior?

Thanks,
-Flack
Nov 17 '05 #1
0 1124

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

Similar topics

6
by: DJ Majestik | last post by:
OK, I am devising a php page that will handle a form submission, and wanted to know if anyone has already setup such an idea, or if you had links to point to good tutorials on this. Basically I...
0
by: AMDIRT | last post by:
I have a few questions about IssueVision (from WindowsForms) concerning its scalability and performance. Rather, if I were to implement techniques described here into another application, how...
0
by: drachon | last post by:
I have added the call to the DoDragDrop within the RTB's MouseDown event to initiate the drag. But this causes the doubleclick to selected a word within the RTB to not work. Any ideas? sample...
3
by: Kelvin Leung | last post by:
Hi I use Drag and Drop between 2 TreeView Control under VB.Net But I found that it cannot work when I add sub-class for each node Is it drag and drop method cannot work when the node with...
105
by: Christoph Zwerschke | last post by:
Sometimes I find myself stumbling over Python issues which have to do with what I perceive as a lack of orthogonality. For instance, I just wanted to use the index() method on a tuple which does...
3
by: jm | last post by:
>From a C. Petzold book I have Programming Windows C#. It's a little old now, but anyway, it has on page 71 (shortened): form.Paint += new PaintEventHandler(MyPaintHandler); static void...
0
by: Alex | last post by:
Hi all, I'm having a problem with drag/drop on listboxes... basically I created a user control that is used to create many listboxes on the form dynamically at runtime. Each of these is...
9
by: Thomas Ploch | last post by:
Hello fellow pythonists, I have a question concerning posting code on this list. I want to post source code of a module, which is a homework for university (yes yes, I know, please read...
8
by: Bruce_Stough | last post by:
I am currently using Control.DoDragDrop to drop a text string into Excel. I use the following code DataObject dd = new DataObject();...
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
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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:
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,...

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.