Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / Windows Forms / WinForm General / August 2006

Tip: Looking for answers? Try searching our database.

MouseHover event during drag and drop operations

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
James - 07 Jun 2006 10:40 GMT
Hi,

I am writing a classic, "Explorer"-like app in vb.net 2003 (dotnetfx1.1).

I have written code to handle the dragging and dropping of items from a
ListView on the right hand part of the form to a TreeView on the left part of
the form. When the user pauses over a node in the TreeView in the middle of a
drag and drop operation, I'd like the node to automatically expand to reveal
the child nodes, just as you see in many commercial applications. However, I
am unable to create this behaviour because the TreeView control does not fire
the MouseHover event whilst in the middle of a drag and drop operation.

Are there any workarounds to this?

Regards,

James
Stoitcho Goutsev (100) - 07 Jun 2006 14:38 GMT
James,

During drag and drop operations no mouse messages are sent. In this case
windows enters special modal loop and sends special drag&drop notifcations
to the window under the mouse curosor if registered as potential drop
target.

In windows forms instead of expecting mouse events during D&D you need to
process: DragEnter, DragLeave, DragOver and DragDrop events. DragOver is
equivalent to MouseHover.

Signature

HTH
Stoitcho Goutsev (100)

> Hi,
>
[quoted text clipped - 18 lines]
>
> James
James - 07 Jun 2006 15:56 GMT
Thanks for this.

How would I simulate a MouseHover event during the DragOver event?

James

> James,
>
[quoted text clipped - 29 lines]
> >
> > James
Stoitcho Goutsev (100) - 07 Jun 2006 18:19 GMT
Why do you want to simulate it? Just use DragOver.

Signature

Stoitcho Goutsev (100)

> Thanks for this.
>
[quoted text clipped - 41 lines]
>> >
>> > James
Gamey - 21 Aug 2006 03:53 GMT
Well, I have a similar issue.  For my app, I would like to process keyboard
input and or the mouse wheel during a drop operation.  DoDragDrop eats all
mouse and keybouard input.  The only thing I can get at is mouse button state
and the esc, ctrl, alt and shift keys which MS views as primarily relevant
for a dragdrop operation.  

So...  how can I get mouse wheel and keypress events or state from within
DragHover or anywhere else in the few methods available for handling drag
drop?

> Why do you want to simulate it? Just use DragOver.
>
[quoted text clipped - 43 lines]
> >> >
> >> > James

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.