private
void
webBrowser1_DocumentCompleted(
object
sender, WebBrowserDocumentCompletedEventArgs e)
{
foreach
(HtmlElement archor
in
this
.webBrowser1.Document.Links)
{
archor.SetAttribute(
"target"
,
"_self"
);
}
foreach
(HtmlElement form
in
this
.webBrowser1.Document.Forms)
{
form.SetAttribute(
"target"
,
"_self"
);
}
}
private
void
webBrowser1_NewWindow(
object
sender, CancelEventArgs e)
{
e.Cancel =
true
;
}
WebBrowser1.AllowWebBrowserDrop=
false
;
WebBrowser1.WebBrowserShortcutsEnabled=
false
;
WebBrowser1.IsWebBrowserContextMenuEnabled=
false