using WebBrawser to open a URL from a c# application
-
hello, i am using the following code:
WebBrowser Web = new WebBrowser();
Web.Navigate("http://...", "_blank");. does anyone know if it is memory consuming? and if i dont have internet explorer as a default browser will it work? for example with firefox. tnx , avi
-
hello, i am using the following code:
WebBrowser Web = new WebBrowser();
Web.Navigate("http://...", "_blank");. does anyone know if it is memory consuming? and if i dont have internet explorer as a default browser will it work? for example with firefox. tnx , avi
shabya wrote:
does anyone know if it is memory consuming?
Yes, very. It says so in the documentation[^], 'The WebBrowser control is resource-intensive. Be sure to call the Dispose() method when you are finished using the control to ensure that all resources are released in a timely fashion. You must call the Dispose() method on the same thread that attached the events, which should always be the message or user-interface (UI) thread.'
shabya wrote:
if i dont have internet explorer as a default browser will it work?
Yes
My failometer is detecting vast quantities of FAIL! "Its SQL - hardly programming..." (Caslen)
-
hello, i am using the following code:
WebBrowser Web = new WebBrowser();
Web.Navigate("http://...", "_blank");. does anyone know if it is memory consuming? and if i dont have internet explorer as a default browser will it work? for example with firefox. tnx , avi
though it is memory consuming but you can use it normal circumstances easily. If you have a very resource hungry application then you should avoid using it. You can use it irrelevant of what your default browser is.
Ahsan Ullah Senior Software Engineer MCTS 2.0
-
hello, i am using the following code:
WebBrowser Web = new WebBrowser();
Web.Navigate("http://...", "_blank");. does anyone know if it is memory consuming? and if i dont have internet explorer as a default browser will it work? for example with firefox. tnx , avi
shabya wrote:
and if i dont have internet explorer as a default browser will it work? for example with firefox.
It still uses Internet Explorer to render the page, regardless of your default browser.
Despite everything, the person most likely to be fooling you next is yourself.
-
shabya wrote:
and if i dont have internet explorer as a default browser will it work? for example with firefox.
It still uses Internet Explorer to render the page, regardless of your default browser.
Despite everything, the person most likely to be fooling you next is yourself.
about the browser being opened - what if explorer is removed ? (if it is possible i dont know) i went to the WebBrowser thing because i couldn't open the desired URL in a new window. what happened was it ran over an existing page... the code that i used:
System.Diagnostics.Process.Start("http://www...");
. using iexplore /new and stuff doesnt work here tnx
-
about the browser being opened - what if explorer is removed ? (if it is possible i dont know) i went to the WebBrowser thing because i couldn't open the desired URL in a new window. what happened was it ran over an existing page... the code that i used:
System.Diagnostics.Process.Start("http://www...");
. using iexplore /new and stuff doesnt work here tnx
You might be able to remove the Internet Explorer application, but the rendering engine that the control uses is still there. If the browser opens a new window or reuses windows is a choise in the browser settings. In Internet Explorer it's under advanced options and is called "Reuse windows for launching shortcuts".
Despite everything, the person most likely to be fooling you next is yourself.
-
You might be able to remove the Internet Explorer application, but the rendering engine that the control uses is still there. If the browser opens a new window or reuses windows is a choise in the browser settings. In Internet Explorer it's under advanced options and is called "Reuse windows for launching shortcuts".
Despite everything, the person most likely to be fooling you next is yourself.