Jump to content

Steve Maughan

Members
  • Content Count

    9
  • Joined

  • Last visited

Community Reputation

3 Neutral

About Steve Maughan

  • Birthday September 23

Technical Information

  • Delphi-Version
    Delphi 10.2 Tokyo

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. Steve Maughan

    How to "eat" the second OnMouseDown / OnMouseUp events after a DblClick?

    Hi Attila, Thanks! Yes - I managed to get it working using a similar technique. I set a flag in the DblClick event and then sent a message to clear the flag. Steve
  2. Steve Maughan

    How to "eat" the second OnMouseDown / OnMouseUp events after a DblClick?

    Looks like I haven't figured it out at all. It seems much more complex. Here's the order of events: OnMouseDown (processed with no problem) OnMouseUp (processed with no problem) OnDblClick - I'm showing a form for the user at this point. The GUI is recording the mousemove actions and generating OnMouseMove messages OnMouseDown - the second OnMouseDown of the double click, which can be ignored using a flag OnMouseUp - the second OnMouseUp of the double click, which can be ignored using a flag, and the fag can be reset Multiple OnMouseMove - then all of the OnMouseMove messages that were generated while the form was showing are now processed How do I either ensure the OnMouseMove messages aren't generated when the form is shown, or how do I remove them from the message queue? Here's a short video that shows the behavior: All help appreciate! Thanks, Steve
  3. Steve Maughan

    How to "eat" the second OnMouseDown / OnMouseUp events after a DblClick?

    I figured it out. Set a flag on the DblClick event, exit out of the OnMouseDown if the flag is set, then do the same for OnMouseUp but also reset the flag.
  4. I have a TPaintBox where I normally process OnMouseDown, OnMouseMove and OnMouseUp events. I'd like to perform an action using the DoubleClick even. It seems that when the user double clicks the order of events is as follows: OnMouseDown OnMouseUp OnDblClick OnMouseDown OnMouseUp I'd like to cancel / "eat" the second OnMouseDown and OnMouseUp events. How can I do this? Setting them to "nil" doesn't seem to work. Thanks - Steve
  5. Steve Maughan

    How to get access to quality.embarcadero.com?

    Thanks - my username worked!
  6. I hope this is an easy question to answer... How to get access to quality.embarcadero.com? My normal email and password that I use for the Maintenance site doesn't work. Thanks, Steve
  7. I didn't know about "Hypot": thanks for sharing!! Steve
  8. I do this all the time in AlignMix, our mapping package. Here's our super-fast algorithm: 1. Have a sorted list along one dimension (I normally do longitude) 2. Do a binary search to find the point with the closest longitude (let's call this P:0 ) and record the distance between this point and the search point 3. Start a loop: look at the next sequential point from P:0 in the sorted list; record the distance and update if smaller than previous; exit the loop if the difference in the longitude is now greater than the shortest distance found, otherwise move on to next point 4. Start a loop: look at the previous sequential point from P:0 in the sorted list: record the distance and update if smaller than previous; exit the loop if the difference in the longitude is now greater than the shortest distance found, otherwise move on to next point In practice I combine steps 3 & 4 so it alternates searching for the next above and the next below P:0. Hope that helps. In my tests this is extremely fast and scales the same as a binary search (log(n)) Steve
×