normal drag and drop behaviour

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
 
M

Mark Mischke

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top