Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Drag Drop
Message
From
26/06/2009 06:03:53
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
 
General information
Forum:
ASP.NET
Category:
Coding, syntax and commands
Title:
Miscellaneous
Thread ID:
01408295
Message ID:
01408573
Views:
42
>>>I can't for the life of me see how to start a drag operation in C#. All the Google results I found seem to be for dropping something from Windows into a C# app. What if I just want to drag a user control across the form?
>>
>>Did you try:
>>
>>DoDragDrop( myControl, DragDropEffects.Move )
>>
>>or in control's events:
>>
>>DoDragDrop( this, DragDropEffects.Move )
>>
>>Cetin
>
>
>Ok, so now I have this:
>
>private void XColumnHeader_MouseMove(object sender, MouseEventArgs e)
>{
>    if (e.Button == MouseButtons.Left)
>    {
>        DoDragDrop(this, DragDropEffects.Move);
>    }
>}
>
>
>As soon as I move the mouse the cursor changes to the no drop icon and the DragDrop event of the target control does not fire.

Is target ready to accept the drop?
Cetin
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform