开发者

how to make a webbrowser control go blank in c#?

开发者 https://www.devze.com 2023-03-21 20:50 出处:网络
Initially when the webbrowser is just loaded onto a form , it is blank(ie white color) . Once we go to a particular website , is there a way to make it go blank again .

Initially when the webbrowser is just loaded onto a form , it is blank(ie white color) . Once we go to a particular website , is there a way to make it go blank again .

I tried going through the methods , but did not find one that would make this happen . Is there another开发者_JAVA百科 way or am i missing something ?


Give this a try:

webBrowser1.Navigate("about:blank");


You'll need to convert "about:blank" to a uri in order to use BinaryTox1n's answer.

webBrowser1.Navigate(new Uri("about:blank"));
0

精彩评论

暂无评论...
验证码 换一张
取 消