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

C#-APP: Drag And Drop On RichTextBox - How To Detect Drag Source

Hi all!

I'm getting in some trouble with Drag and Drop operations.

I have a RichTextBox inside a Form. I want to allow text moving inside the RichTextBox itself, which is achieved by simply enabling the EnableAutoDragDrop property... On the other hand, when dragged text comes from an external application (or another component in my app) I want to apply some extra formatting (put the dropped text in bold for example), or simply not allow this kind of Drag And Drop operation.

I'm handling events RichTextBox_DragEnter and RichTextBox_DragDrop, but cannot find a way to distinguish the Drag Source to perform the proper action depending on if it is a RTB self DragDrop or external DragDrop. I think the DragEventArgs doesnt provide such info.

Any help appreciated.
Mar 5 '08 #1
0 1757

Sign in to post your reply or Sign up for a free account.

Similar topics

0
by: SamSpade | last post by:
Anyone know anything about add Drag-Drop in a RichTextbox. I want to be able to drag (move) some text in the box to a different place in the box Any help at all will be appreciated
3
by: simon_s_li | last post by:
Hi, I am having problems using drag drop and re-ordering items. Example: When I drag and item from position 1 and drag it to position 3, I want to re-order all the items accordingly. This...
0
by: SamSpade | last post by:
I've been coding for Drag-Drop in a RichTextBox. I want to drag some text in the box to a different place in the box. I've tried a couple of times and each approach has a short coming. Is...
2
by: SamSpade | last post by:
There seems to be two ways to put things on the clipboard ( I don't mean different formats): SetClipboardData and OleSetClipboard If I want to get data off the clipboard do I care how it was put...
4
by: Qingdong Z. | last post by:
I have a VS.NET windows application which use drag-drop feather. It works fine when application start, but stops working after application run one or two days. The application is related to Video...
0
by: SamSpade | last post by:
I've mentioned in other post that I've implemented Drag/Drop for a RichTextBox and using it clears the undo buffer except for the Drag/Drop undo. I'd love to hear from someone that they have...
0
by: SamSpade | last post by:
There seems to be two ways to put things on the clipboard: SetClipboardData and OleSetClipboard If I want to get data off the clipboard do I care how it was put there? What about Drag/Drop;...
0
by: Pesso | last post by:
I'm loading a text file to a RichTextBox control to drag a selection of a text and drop it into a tree view control. It works except after the drag and drop operation the RichTextBox scrolls to the...
1
by: Alan T | last post by:
I have a tree view on the left and a list view on the right. I will drag and drop from list view to treeview, and also drag drop tree node on the same tree view. How do I differentiate I drag...
2
by: bob | last post by:
Hi all, I have a treeview that has drag drop. Works well enough but... If you drag out of bounds of the treeview the nodrop icon comes on. Fair enough. But when I move back inside the treeview...
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
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: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
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...

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.