Results 1 to 6 of 6

Thread: Is it possible to disable the double click event of a control?

  1. #1

    Thread Starter
    Fanatic Member
    Join Date
    Feb 2000
    Location
    Japan
    Posts
    840

    Question

    I'd like the user to be able to click very quickly on a variey of controls (like labels etc) and catch the mouse up and down events (or click).

    BUT, if the user clicks too quickly the double click event fires, skips the mouse down and then processors the mouse up!

    so clicking 5 times very quickly on a label produces

    DOWN->UP->DOUBLECLICK->UP->DOWN->UP->DOUBLECLICK->UP->DOWN->UP

    instead of ....

    DOWN->UP->DOWN->UP->DOWN->UP->DOWN->UP->DOWN->UP->

    is there a way to kill the double click event?

    Cheers?

    Paul Dwyer
    Network Engineer
    Aussie In Tokyo

    Using Powerbasic 6 & VB6 SP4 (Please also add your VB Version to your signature!)

  2. #2
    Fanatic Member r0ach's Avatar
    Join Date
    Dec 1999
    Location
    South Africa
    Posts
    722
    This is what I would have done (Not the best way, I asume but...).

    Create a control.
    Simple.
    Create a control using a label, and use all of it's events and properties and methods, but exclude DblClick()

    r0ach™
    Don't forget to rate the post

  3. #3
    Hyperactive Member
    Join Date
    Feb 2000
    Location
    Sedgefield
    Posts
    337

    Question Don't know if this would work....

    You could reset the double-click time of the whole system (through the mouse cpl), but I expect that would just royally f**k everything else....


    Alternatiely, you're still getting 5 UP events...can't you do what needs doing there?

    [Edited by Judd on 06-12-2000 at 05:11 AM]

    Dan

    Outside of a dog, a book is a man's best friend.
    Inside of a dog, it's too dark to read.

  4. #4

    Thread Starter
    Fanatic Member
    Join Date
    Feb 2000
    Location
    Japan
    Posts
    840

    Re: Don't know if this would work....

    I think I'll go with the user control... It's basicall what I'd end having to to anyway

    I need a screen refresh after the down events before the up events and I agree 101% about right-royaling the system with the mouse timer change. After searching the web I kept finding that tip but nothing else. I've heard of subclassing when you what to handle extra evnts but when you want handle less... ?

    Where Sam Finch? he's the local subclassing genuis!

    Paul Dwyer
    Network Engineer
    Aussie In Tokyo

    Using Powerbasic 6 & VB6 SP4 (Please also add your VB Version to your signature!)

  5. #5
    Hyperactive Member
    Join Date
    Feb 2000
    Location
    Sedgefield
    Posts
    337

    Exclamation Isn't that the solution then....?

    Can't you sub-class to catch the double-click message, and replace it with a single-click or mouse button down or whatever? Or do you always have to pass the intercepted message on? (I don't think you do...)

    With usercontrols you have extra dlls etc to spread around...

    Dan

    Outside of a dog, a book is a man's best friend.
    Inside of a dog, it's too dark to read.

  6. #6

    Thread Starter
    Fanatic Member
    Join Date
    Feb 2000
    Location
    Japan
    Posts
    840

    Thumbs up Re: Isn't that the solution then....?

    I hate to admit it but I'm a subclassing Virgin!, I've never had to do it before.

    I was testing an idea for a user control on an exe anyway so I suppose the answer was sitting in front of me the whole time...

    Thanks guys
    Paul Dwyer
    Network Engineer
    Aussie In Tokyo

    Using Powerbasic 6 & VB6 SP4 (Please also add your VB Version to your signature!)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width