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

Is there an event that occur after DragDrop event?

hello , sadly im a noob , and i cant manage to find an event that would accure after i droped a file in a richtextbox

*when u drop a file into a Rtb the icon's image is copied on to the control if u i downloaded a userr control wich derives from richtextbox , this control as a few method in wich it manipulates RTF among does are AppendRtf(_rtf)

now i want to present u with a secnario wich works
1) i drag a file into the Rtb, i check if its a file deing draged onto the control if true i render all effects
Expand|Select|Wrap|Line Numbers
  1. void txt_send_DragEnter(object sender, System.Windows.Forms.DragEventArgs e)
  2.         {
  3.             txt_send.Clear();
  4.             if (e.Data.GetDataPresent(DataFormats.FileDrop, false) == true)
  5.             {
  6.                 e.Effect = DragDropEffects.All;
  7.             } 
  8.  
  9.         }
2) i drop the file ,here for this secnario all i do is update a boolean value that indicates the file as been droped
Expand|Select|Wrap|Line Numbers
  1. void txt_send_DragDrop(object sender, System.Windows.Forms.DragEventArgs e)
  2.         {
  3.             File_droped = true;           
  4.         }
*after this event (2) an image is inserted into the Rtb

3) FINALLY in order to test the issue i presented above , i call the mouseUp event , wich there i copy that image's RTF(Rich Text Format)

*so now ill click the control , and the following event is dispatched

*I JUST WANT TO CLARIFY THAT IM AWARE THE MOUSEUP DOSE NOT ACCURE AFTER THE DRAGDROP EVENT ,I ONLY ADD IT TO TEST THE ACCTUALL OPERATION I WANT TO PREFORM AND SEE THAT IT WORKS,
Expand|Select|Wrap|Line Numbers
  1.   void txt_send_MouseUp(object sender, System.Windows.Forms.MouseEventArgs e)
  2.         {
  3.             if (File_droped)
  4.             {
  5.                 txt_main.AppendRtf(txt_send.Rtf); 
  6.             } 
  7.         }
*now the file's icon (Image) is copied to anouther RichTextBox (THIS WORKS)

now again what im looking for is an acctuall event that accures after the DragDrop Event , becuase i want this to preform after DragDrop as ended
if i attempt to do this from inside the event ,it wont work becuase the image only appears after the event
txt_main.AppendRtf(txt_send.Rtf);
Feb 5 '11 #1
0 1176

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

Similar topics

0
by: reiks | last post by:
My requirement is to ahve a dragdrop event for my web datagrid. How can I acheive it?
0
by: Flack | last post by:
Hello, Is it possible to find out how many methods are listening to a certain event? For example, if a number of methods subscribed to a controls DragDrop event using +=, can I find out how many...
3
by: Dan | last post by:
How do I find out what control a DragDrop event comes from? I initially presumed that it was the "sender" parameter. But this always seems to be the destination. Ie ... private void...
3
by: Dpage | last post by:
Hello, I'm trying to allow users to drag a file (in this case a crystal report .rpt file) onto my application's icon and have that drop event open my application and open the report in the...
9
by: DrBonzo | last post by:
Is there any effective difference between doing something in the DragDrop event handler and doing it in the OnDragDrop(.) method of a control? I'm coming from a MFC background and am having a hard...
4
by: Nathan Sokalski | last post by:
I am writing a piece of code for an ASP.NET function that generates an onKeyPress JavaScript eventhandler that uses the event.keyCode / event.which properties. I have two situations that I would...
0
by: yuje101 | last post by:
Hi! All I tried to add dragdrop event to one of the widget by using C++ .Net 2003. It seems the event handler did not get called? From one control say listbox to another listbox on the same...
3
by: Jim R | last post by:
I am trying to use Dragdrop event on a control in a VB.NET 2005 app. The app is getting the DragEnter event, but is never getting a DragDrop event. My control has its "AllowDrop" property set to...
1
by: Jeff Williams | last post by:
With a DragDrop event is there a way to determine which control I have droped files onto. ie I have 5 picture boxes on the form. I want to use one dragdrop event and when the drop occurs get...
0
by: =?Utf-8?B?cGNoYWs=?= | last post by:
Hi! I'm trying to utilize drag drop between several user controls, which are contained in various panels. The user control containes a couple of textboxes, comboboxes and labels, and I will move...
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: 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...
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:
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...
0
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,...
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,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
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...

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.