473,669 Members | 2,495 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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.DoDr agDrop(data,Dra gDropEffects.Co py);
}

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 1130

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

Similar topics

6
1715
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 have a form (which I use smarty templating to display, and smartyvalidator to validate). The php page basically is driven by the action variable (add, add_confirm, edit, edit_confirm, view, delete). When the form starts out, it is in view mode....
0
1374
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 would it perform, how well will it scale, and what considerations should I be take into account? First, let me say that I appreciate the work done to get this application out there for me to look over. I continually refer to it and I think I am...
0
1285
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 code: private void sourceTextBox_MouseDown(object sender, System.Windows.Forms.MouseEventArgs e) { string plainText;
3
1410
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 sub-class ? If no, any related information/reference ? Thanks a lot
105
5297
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 not work. It only works on lists and strings, for no obvious reason. Why not on all sequence types? Or, another example, the index() method has start and end parameters for lists and strings. The count() method also has start and end parameters...
3
1664
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 MyPaintHandler(object objSender, PaintEventArgs pea) { Graphics grfx = pea.Graphics; grfx.Clear(Color.Chocolate); }
0
2293
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 assigned a unique value for employee. When an item is dragged from one listbox to another, a row in the db is updated to reflect the employee change and the listboxes then refresh from the db & the item is shown in the dragged to listbox.
9
1287
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 on...). It is a web crawler (which I will *never* let out into the wide world) which uses regular expressions (and yes, I know, thats not good, too). I have finished it (as far as I can), but since I need a good mark to
8
3128
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(); dd.SetData(DataFormats.Text,"\\\\ws-it-bstough\\ShareFolder\\Test.wav"); DoDragDrop(dd,DragDropEffects.Copy); The code works as expected but it will always populate into Excel as a string literal and not as a link to the audio file. If I type the path into a excel the link appears correctly. I am...
0
8466
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8384
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8896
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8810
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
8659
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
5683
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 then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4387
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2798
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 we have to send another system
2
2035
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.