Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Drag Drop
Message
 
À
26/06/2009 17:34:55
Cetin Basoz
Engineerica Inc.
Izmir, Turquie
Information générale
Forum:
ASP.NET
Catégorie:
Code, syntaxe and commandes
Titre:
Divers
Thread ID:
01408295
Message ID:
01409092
Vues:
48
>>>>>>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
>>
>>I don't know. Never done Drag & Drop in C# before.
>
>It doesn't have anything to do with C#. Basic drag&drop requirement.
>Cetin

Sure it does. I HAVE done drag drop in VFP before, and there is a DragMode property that turns on Drag&Drop. I don't see anything like this in C#. So, it IS a C# thing.

Do you have any code to demonstrate this?
Everything makes sense in someone's mind
public class SystemCrasher :ICrashable
In addition, an integer field is not for irrational people
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform