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 / Languages / VB.NET / July 2005

Tip: Looking for answers? Try searching our database.

differ mouse down from mouse click

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Boni - 31 Jul 2005 13:54 GMT
Dear all,
A mouse click on some object in my application should select this object,
where mouse down should start moving until mouse up.
But, when I press mouse down small move always happens. I tried to work with
move tolerance, but then if mouse was near the border of the object, it
leaves object and next mouse move is not passed to it. So I am thinking to
work with timer. I.e.
if MouseDown and NoMouseUpFor1second then move else ignore.
Is it a best solution or somebody has a better idea for this standard
problem?
With best regards,
Boni
Phil - 31 Jul 2005 14:27 GMT
Hi Boni,

This is a 'classic' issue with drag & drop. I can't remember the exact code
but hopefully this will help.

I believe you need to create an offset variable. The offset is made from the
difference between the TopLeft of your selected control and the current
mouse position wrt the screen. You then of course use this offset when
moving your control.

HTH,

Phil

> Dear all,
> A mouse click on some object in my application should select this object,
[quoted text clipped - 8 lines]
> With best regards,
> Boni

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



©2010 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.