Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Disable clicking or typing in a WebBrowser Control

I am using a WebBrowser control. I need to disable clicking or typing.

How do I do this?

like image 227
Cocoa Dev Avatar asked Nov 05 '12 17:11

Cocoa Dev


2 Answers

To just prevent users clicking on links, I set the AllowNavigation property to False.

Technically, users can still click on the links, they just don't do anything. After setting this property, updating the DocumentText property doesn't seem to work and you need to toggle the AllowNavigation on, set the html text and then toggle off.

like image 187
PeterX Avatar answered Nov 05 '22 11:11

PeterX


you can just purely disable WebBrowser controll I believe it supports enable disable function therefore you can read but you cant click or type

YouWebBrowserControllID.Enabled = false;

in other case try this

((Control)webBrowser1).Enabled = false;
like image 35
COLD TOLD Avatar answered Nov 05 '22 11:11

COLD TOLD