Hi guys, existe some way to block the right mouse click to avoid the source and print menu?
Thanks
Disclosure Statement: This site contains affiliate links, which means that I may receive a commission if you make a purchase using these links. As an eBay Partner, I earn from qualifying purchases.
Block Right Click
- salvadordf
- Posts: 4564
- Joined: Thu Feb 02, 2017 12:24 pm
- Location: Spain
- Contact:
Re: Block Right Click
Hi,
Use the TChromium.OnBeforeContextMenu event and add this code :
This is explained here :
http://magpcss.org/ceforum/apidocs3/pro ... ndler.html
http://magpcss.org/ceforum/apidocs3/pro ... Model.html
If you prefer to read the original CEF code, these are the code comments for that event :
https://github.com/chromiumembedded/cef ... ler_capi.h
Use the TChromium.OnBeforeContextMenu event and add this code :
Code: Select all
model.clear;
http://magpcss.org/ceforum/apidocs3/pro ... ndler.html
http://magpcss.org/ceforum/apidocs3/pro ... Model.html
If you prefer to read the original CEF code, these are the code comments for that event :
https://github.com/chromiumembedded/cef ... ler_capi.h
Code: Select all
///
// Called before a context menu is displayed. |params| provides information
// about the context menu state. |model| initially contains the default
// context menu. The |model| can be cleared to show no context menu or
// modified to show a custom menu. Do not keep references to |params| or
// |model| outside of this callback.
///