CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 8 of 8
  1. #1
    Join Date
    Aug 2001
    Posts
    16

    Diabling or removing the right mouse click option on a Control

    Hi All,

    IS there a way to disable or removed the right mouse click option on a Control ie. when using the control on VB form.

    Thanks



  2. #2
    Join Date
    Jan 2000
    Location
    Olen, Belgium
    Posts
    2,477

    Re: Diabling or removing the right mouse click option on a Control

    In many cases (not all) you can use the mousedown event of the control to detect that the right button was clicked. When this happens, disable the control, and enable it again.

    Tom Cannaerts
    [email protected]

    Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the universe trying to produce bigger and better idiots. So far, the universe is winning -- Rich Cook
    Tom Cannaerts
    email: [email protected]
    www.tom.be (dutch site)

  3. #3
    Join Date
    Aug 2001
    Posts
    16

    Re: Diabling or removing the right mouse click option on a Control

    Hi There,

    I've tried using the mousedown event on this control, but it doesn't work, I've tried on other controls before and it works. So, there is not a solution to this?

    Beth


  4. #4
    Join Date
    Jan 2000
    Location
    Olen, Belgium
    Posts
    2,477

    Re: Diabling or removing the right mouse click option on a Control

    I'm not sure, what control are we talking about?

    Tom Cannaerts
    [email protected]

    Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the universe trying to produce bigger and better idiots. So far, the universe is winning -- Rich Cook
    Tom Cannaerts
    email: [email protected]
    www.tom.be (dutch site)

  5. #5
    Join Date
    Aug 2001
    Posts
    16

    Re: Diabling or removing the right mouse click option on a Control

    It's a date user control.


  6. #6
    Join Date
    Jan 2000
    Location
    Olen, Belgium
    Posts
    2,477

    Re: Diabling or removing the right mouse click option on a Control

    Date user control, like in "Microsoft Calender Control" or like in "Some third party usercontrol"?

    Tom Cannaerts
    [email protected]

    Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the universe trying to produce bigger and better idiots. So far, the universe is winning -- Rich Cook
    Tom Cannaerts
    email: [email protected]
    www.tom.be (dutch site)

  7. #7
    Join Date
    Aug 2001
    Posts
    16

    Re: Diabling or removing the right mouse click option on a Control

    It is a third party control contains a calendar control and a text box. The RaiseEvent for mousedown and mouseup is done for the usercontrol only. Is that a problem.

    Thanks


  8. #8
    Join Date
    Jan 2000
    Location
    Olen, Belgium
    Posts
    2,477

    Re: Diabling or removing the right mouse click option on a Control

    What you need to do is to put the code in the mousedown event of each of the controls on the usercontrol.

    Tom Cannaerts
    [email protected]

    Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the universe trying to produce bigger and better idiots. So far, the universe is winning -- Rich Cook
    Tom Cannaerts
    email: [email protected]
    www.tom.be (dutch site)

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

Featured