Win95 edit context menu disable API 
Author Message
 Win95 edit context menu disable API

I am developing in VB4.0 and am needing to disable the edit context menu
which appears when the user right-clicks on a text box.  I am not
needing any other menu to appear, and I know that I can possibly use the
message blaster OCX.  I would prefer to use the API call insetad of
importing one more OCX into the project.

Any info from the experts would be greatly appreciated.

Christopher Mooney



Thu, 28 Oct 1999 03:00:00 GMT  
 Win95 edit context menu disable API

        The advice I'm going to give you is totally untested, but theoretically,
you could detect the user clicking the right button in the text box under
the mousedown event and cancel it.  Something like this:

Private Sub Text1_MouseDown(Button As Integer, Shift As Integer, X As
Single, Y As Single)
        If Button = 2 'if the second mouse button is pushed then ...
                ' insert menu cancellation code here.
        End If
End Sub

        I remember on several instances, I'd be navigating in the Start Menu when
suddenly, the menu would close itself.  It would close when it lost the
focus or another application opened.  I doubt you'll want to open another
program just to cancel a menu, but the focus thing may work.  Give it a
shot.
        Remember, I have not tested this, and I am doubtful that it will work.
But hey, it's worth a try.



Quote:
> I am developing in VB4.0 and am needing to disable the edit context menu
> which appears when the user right-clicks on a text box.  I am not
> needing any other menu to appear, and I know that I can possibly use the
> message blaster OCX.  I would prefer to use the API call insetad of
> importing one more OCX into the project.

> Any info from the experts would be greatly appreciated.

> Christopher Mooney



Fri, 29 Oct 1999 03:00:00 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. Disable context menu or close context menu

2. Context Menu Handlers disables standard menu items

3. disable menu point in TextBox context menu

4. How can I edit context menu

5. Edit context menu

6. Editing VB.Net Context-menus

7. Customizing Context Menu -- for Edit Window

8. Disable context menu on text field

9. disable context menu on TextBox ?

10. disable context menu on web control

11. Disabling context menu in Text Box Help!!!

12. Combo Box System Context menu disabling Help!!!

 

 
Powered by phpBB® Forum Software