Hack Forums
[.NET] Silent WebBrowser ::: Run WebBrowser silently in the background (beginner friendly) - Printable Version

+- Hack Forums (https://hackforums.net)
+-- Forum: Tech (https://hackforums.net/forumdisplay.php?fid=444)
+--- Forum: Coding (https://hackforums.net/forumdisplay.php?fid=151)
+---- Forum: Software Development (https://hackforums.net/forumdisplay.php?fid=118)
+---- Thread: [.NET] Silent WebBrowser ::: Run WebBrowser silently in the background (beginner friendly) (/showthread.php?tid=3764682)



Silent WebBrowser ::: Run WebBrowser silently in the background (beginner friendly) - Mike Tyler - Sep 20, 2013

Silent Webbrowser
[Image: c6pmLqL.gif]

Run the webbrowser in the background. Pretty straightforward with proper multi-threading and delegated so your application can do other work while the webbrowser is working.

Download:
http://ge.tt/186Syds/v/0?c (vs12)


* - gigajew - Sep 21, 2013

Wait, why would you want to use a webbrowser control?


* - ident - Sep 21, 2013

Its nice you want to release projects but you should only do so if you actually know what you are doing. This line is just laugh worthy "with proper multi-threading and delegated ", I suggest you learn how controls work before making any thing else. A browsers Navigate is an Async call any way which means it's performed on a secondary thread. You cant thread a browser you silly boy.

WTF is this,

[Image: 741d8ca3ab0ac97bb5dcaadce15a8b92.png]

Why are you forcing all events be processed when there is no need? The control will be disposed of when it leaves it's scope. Why on earth do you start your variables with the former naming conventionName at local scope? It was previously class scope at best any way. You then declare class level variables m and also dim. You follow no guidelines.

Why are you passing an array of object simply holding a Boolean and a string, did you learn to code off the back of a cereal box?

You're using a function that returns a string "ok" for what purpose? Do you understand what functions are for. I hope no One ever follows some thing this bad.


* - Mike Tyler - Sep 21, 2013

Wow... look, the vb6 kid is talking.

Move along, the code is too advanced for you.

Also on that async thing and webbrowser's can't be threaded. I just did it so you make me a sandwich bitch.

(Sep 21, 2013 03:53 AM)gigajew Wrote:  Wait, why would you want to use a webbrowser control?

It's great for allot of purposes, there's also people asking for this kind of solution.


* - Routess - Sep 21, 2013

(Sep 21, 2013 05:07 AM)Mike Tyler Wrote:  Wow... look, the vb6 kid is talking.

I guess the code is too advanced for you, move along.

It's great for allot of purposes, also there are some people asking for this kind of solution.

Anyways ident is right when he tells you that

PHP Code

<?php 
do while webbrowser.readystate <> webbrowser.readystate.complete
application
.doevents
Loop 
this is shit.

just never use application.doevents in a loop.


* - Mike Tyler - Sep 21, 2013

god sake man, it's in a thread. gimme me a break.

the worst thing happening with loops is that I doevent your mom.


* - ident - Sep 21, 2013

Listen, you cant thread a browser. The page will also be loaded on the UI and the request call(navigate) on a secondary thread. All you are doing is creating a new thread to call a secondary thread. Read MSDN WebBrowser.Navigate Method

Navigate asynchronously to the document at the specified Uri.

Why should i give you a break when you post a loud of crap up that other members might follow.