Hiding Context toolbar
Hiding Context toolbar
Is there an API command to hide or disable the context toolbar (the one that appears when right clicking on a face) for parts?
Re: Hiding Context toolbar
Do you mean an API command to change the setting under Tools-Customize such that it doesn't appear, or a command to dismiss it if it's currently shown on screen?
Re: Hiding Context toolbar
Correct me if I'm wrong, but I don't think this menu has a setting in Tool>Customize so it doesn't appear.
But if there is, either way would be great.
![Image](https://i.imgur.com/Nf2V9lN.jpg)
I've found this link that can be used to hide the menu specific to the selection,
but there is still a menu that appears on right click (the one on the right on the above picture)
https://help.solidworks.com/2022/englis ... ple_vb.htm
I guess I could use an event like doc_UserSelectionPostNotify
to do a SendKeys "{ESC}" but that's a bit clunky
But if there is, either way would be great.
![Image](https://i.imgur.com/Nf2V9lN.jpg)
I've found this link that can be used to hide the menu specific to the selection,
but there is still a menu that appears on right click (the one on the right on the above picture)
https://help.solidworks.com/2022/englis ... ple_vb.htm
I guess I could use an event like doc_UserSelectionPostNotify
to do a SendKeys "{ESC}" but that's a bit clunky
Re: Hiding Context toolbar
Why would you want to do that? What are you actually trying to accomplish?
Re: Hiding Context toolbar
I'm working on a macro feature that display custom information in OpenGL,
and can be used to interact in a specific manner with the mouse.
But this menu is in the way.
I would like to disable it while the macro feature is in edit mode.
and can be used to interact in a specific manner with the mouse.
But this menu is in the way.
I would like to disable it while the macro feature is in edit mode.
Re: Hiding Context toolbar
I've manage to block the right click command, and thus the menu, with the InputHelper library. https://github.com/Visual-Vincent/InputHelper
Although I would love to learn a better way to do it with Solidworks commands.
Although I would love to learn a better way to do it with Solidworks commands.
Code: Select all
Private Sub MouseHook_MouseDown(sender As Object, e As InputHelper.EventArgs.MouseHookEventArgs) Handles MouseHook.MouseDown
If e.Button = MouseButtons.Right Then e.Block = True
End Sub
Re: Hiding Context toolbar
Pretty sure SW doesn't have any way to block right-clicks.
Did you even look at Tools-Customize?
Did you even look at Tools-Customize?
Re: Hiding Context toolbar
Yeah. I've tried all those ones. That doesn't do it.
No worries, InputHelper does the job.
No worries, InputHelper does the job.