normal drag and drop behaviour

  • Thread starter Thread starter assaf
  • Start date Start date
A

assaf

hi all

when i allow drag and drop from/to my textbox,
i expect that when i hover over a selected aread,
the cursor would turn into an arror,
instead of an I-Beam.

but this is not the normal behaviour.

i don't know how to make the textbox behave
this way.

all i want is my app to behave as any other app in the world behaves,
when i hover over a selected text area, the cursor
turns into an arrow.


how can i do this?



assaf
 
Hi,

Are you using the DragOver event? If not, you won't see any cursor
changes when entering potential drop targets (although the DragDrop
event will still work properly).

Check out the online docs for DragOver on MSDN. The code required is
usually something minimal, like this:

if (e.Data.GetDataPresent(typeof(myObject)))
{
e.Effect = DragDropEffects.Copy; // or .None, .All, .Move, etc.
}

Cursor changes are handled automatically, unless you want to use
nonstandard cursors.

Mark
 
Back
Top