WebBrowser and Console Applications
-
Does the WebBrowser control introduced in .NET 2.0 work fine with console applications? I'm facing problems doing something like
string x = "abc";
browser.DocumentText = x;Unfortunately, x never gets set, browser.DocumentText always remains as <HTML> </HTML> On a hunch, I tried doing an Application.DoEvents right after setting the DocumentText property and it worked. Does that mean there is no *easy* way to use the WebBrowser just for inspecting and manipulating the DOM tree? Regards Senthil _____________________________ My Blog | My Articles | WinMacro
-
Does the WebBrowser control introduced in .NET 2.0 work fine with console applications? I'm facing problems doing something like
string x = "abc";
browser.DocumentText = x;Unfortunately, x never gets set, browser.DocumentText always remains as <HTML> </HTML> On a hunch, I tried doing an Application.DoEvents right after setting the DocumentText property and it worked. Does that mean there is no *easy* way to use the WebBrowser just for inspecting and manipulating the DOM tree? Regards Senthil _____________________________ My Blog | My Articles | WinMacro
We've had trouble with WebBrowser controls without a parent; you may end up having to create an invisible form and add the browser to that form before you can do things with the document.
-
Does the WebBrowser control introduced in .NET 2.0 work fine with console applications? I'm facing problems doing something like
string x = "abc";
browser.DocumentText = x;Unfortunately, x never gets set, browser.DocumentText always remains as <HTML> </HTML> On a hunch, I tried doing an Application.DoEvents right after setting the DocumentText property and it worked. Does that mean there is no *easy* way to use the WebBrowser just for inspecting and manipulating the DOM tree? Regards Senthil _____________________________ My Blog | My Articles | WinMacro
Yeah, the WebBrowser control won't work properly without a parent form, which you don't have in a Console app. You'll have to create a form to put the control on, but just never show the form. RageInTheMachine9532 "...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
-
Yeah, the WebBrowser control won't work properly without a parent form, which you don't have in a Console app. You'll have to create a form to put the control on, but just never show the form. RageInTheMachine9532 "...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
Your suggestion worked, thank you :) Regards Senthil _____________________________ My Blog | My Articles | WinMacro
-
We've had trouble with WebBrowser controls without a parent; you may end up having to create an invisible form and add the browser to that form before you can do things with the document.
That did the trick, thank you. I dearly wish .NET 2.0 provided a class to do nothing else but parse HTML. Regards Senthil _____________________________ My Blog | My Articles | WinMacro
-
That did the trick, thank you. I dearly wish .NET 2.0 provided a class to do nothing else but parse HTML. Regards Senthil _____________________________ My Blog | My Articles | WinMacro
S. Senthil Kumar wrote:
I dearly wish .NET 2.0 provided a class to do nothing else but parse HTML.
I agree.
Tech, life, family, faith: Give me a visit. I'm currently blogging about: Bought a House! Judah Himango