amtate
asked on
Stop WebBrowser MessageBoxes
Hi,
Does anyone know how to stop the "Do you want to allow.." MessageBoxes appearing whenever you use 'cut', 'copy' & paste with the WebBrowser control?
For example, I'm allowing the user to paste content from the Clipboard directly into the control, though when you click the menu option, you get an annoying "Do you want to allow this page to paste information from your clipboard?" message.
I'm using the following code:
webBrowser1.ExecWB OLECMDID_PASTE, OLECMDEXECOPT_DONTPROMPTUS ER
Can this message be suppressed, as I can't seem to find a property to achieve this?
Does anyone know how to stop the "Do you want to allow.." MessageBoxes appearing whenever you use 'cut', 'copy' & paste with the WebBrowser control?
For example, I'm allowing the user to paste content from the Clipboard directly into the control, though when you click the menu option, you get an annoying "Do you want to allow this page to paste information from your clipboard?" message.
I'm using the following code:
webBrowser1.ExecWB OLECMDID_PASTE, OLECMDEXECOPT_DONTPROMPTUS
Can this message be suppressed, as I can't seem to find a property to achieve this?
I'm not sure what prompts the error you're getting. Possibly "WebBrowser1.Silent" and/or On Error Resume Next will help. If not, allowing users to complete a paste operation as I detailed above may be a workaround.
ASKER
Hi,
This is being done from within a click event - in this case from a ToolBar button...
If I set WebBrowser.Silent = True - it does stop the messages, though unfortunately it also stops the paste event from happening!
This is being done from within a click event - in this case from a ToolBar button...
If I set WebBrowser.Silent = True - it does stop the messages, though unfortunately it also stops the paste event from happening!
Is putting the paste event in a comment button an option?
ASKER
not sure what you mean here?
ASKER
Incidentally, If I use the right-click context menu to cut; copy paste etc - I don't get any prompt messages...
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Sorry--please replace the quoted expression from:
When you try to paste into the WebBrowser control by clicking one of the menu options, you're getting the pop-up message "webBrowser1.ExecWB OLECMDID_PASTE, OLECMDEXECOPT_DONTPROMPTUS ER", is that right?
with
"Do you want to allow.."
When you try to paste into the WebBrowser control by clicking one of the menu options, you're getting the pop-up message "webBrowser1.ExecWB OLECMDID_PASTE, OLECMDEXECOPT_DONTPROMPTUS
with
"Do you want to allow.."
I'm able to paste images and/or text by putting your code into a command button's click event. Are you referring to the menu accessed by right-clicking on the WebBrowser document?