[VB.NET] Threaded Adopter

Discussion in 'Code Snippets and Tutorials' started by expon, Apr 8, 2007.

  1. expon

    expon Administrator
    Staff Member

    Joined:
    Oct 30, 2006
    Messages:
    1,393
    Likes Received:
    56
    Location:
    UK
    This is the source to a Neopets Pet Adopter.

    'Neopets Adopter coded by Robawtic
    'vb.Net 2005
    'Thursday, April 07, 2007
    'Published to http://www.digibliss.net, http://www.neofriends.net, http://www.sooperneo.com
    'Any questions feel free to contact me @ robawtic@gmail.com,
    'MSN: robawtic@gmail.com
    'YIM: robawtic
    Code (vb.net):
    1. <div class="vbnet" id="{CB}" style="font-family: monospace;"><ol><li style="padding: 0 5px; background-color: #fff; line-height: 16px; border-bottom: 1px solid #efefef; border-left: 1px solid #999;">&nbsp;</li><li style="padding: 0 5px; background-color: #f9f9f9; line-height: 16px; border-bottom: 1px solid #efefef; border-left: 1px solid #999;"><span style="color: #008080; font-style: italic;">'Neopets Adopter coded by Robawtic</span></li><li style="padding: 0 5px; background-color: #fff; line-height: 16px; border-bottom: 1px solid #efefef; border-left: 1px solid #999;"><span style="color: #008080; font-style: italic;">'vb.Net 2005</span></li><li style="padding: 0 5px; background-color: #f9f9f9; line-height: 16px; border-bottom: 1px solid #efefef; border-left: 1px solid #999;"><span style="color: #008080; font-style: italic;">'Thursday, April 07, 2007</span></li><li style="padding: 0 5px; background-color: #fff; line-height: 16px; border-bottom: 1px solid #efefef; border-left: 1px solid #999;"><span style="color: #008080; font-style: italic;">'Published to [url]http://www.digibliss.net[/url],[url]http://www.neofriends.net[/url],[url]http://www.sooperneo.com[/url]</span></li><li style="padding: 0 5px; background-color: #f9f9f9; line-height: 16px; border-bottom: 1px solid #efefef; border-left: 1px solid #999;"><span style="color: #008080; font-style: italic;">'Any questions feel free to contact me @ [email]robawtic@gmail.com[/email],</span></li><li style="padding: 0 5px; background-color: #fff; line-height: 16px; border-bottom: 1px solid #efefef; border-left: 1px solid #999;"><span style="color: #008080; font-style: italic;">'MSN: [email]robawtic@gmail.com[/email]</span></li><li style="padding: 0 5px; background-color: #f9f9f9; line-height: 16px; border-bottom: 1px solid #efefef; border-left: 1px solid #999;"><span style="color: #008080; font-style: italic;">'YIM: robawtic</span></li><li style="padding: 0 5px; background-color: #fff; line-height: 16px; border-bottom: 1px solid #efefef; border-left: 1px solid #999;"><span style="color: #0600FF;">Imports</span> System.<span style="color: #0000FF;">ComponentModel</span></li><li style="padding: 0 5px; background-color: #f9f9f9; line-height: 16px; border-bottom: 1px solid #efefef; border-left: 1px solid #999;"><span style="color: #0600FF;">Imports</span> System.<span style="color: #0000FF;">Threading</span></li><li style="padding: 0 5px; background-color: #fff; line-height: 16px; border-bottom: 1px solid #efefef; border-left: 1px solid #999;"><span style="color: #0600FF;">Imports</span> System.<span style="color: #0000FF;">Windows</span>.<span style="color: #0000FF;">Forms</span></li><li style="padding: 0 5px; background-color: #f9f9f9; line-height: 16px; border-bottom: 1px solid #efefef; border-left: 1px solid #999;"><span style="color: #FF8000;">Public</span> <span style="color: #0600FF;">Class</span> Form1</li><li style="padding: 0 5px; background-color: #fff; line-height: 16px; border-bottom: 1px solid #efefef; border-left: 1px solid #999;">&nbsp; &nbsp; <span style="color: #FF8000;">Private</span> Wrapper <span style="color: #FF8000;">As</span> <span style="color: #FF8000;">New</span> EazyNeo</li><li style="padding: 0 5px; background-color: #f9f9f9; line-height: 16px; border-bottom: 1px solid #efefef; border-left: 1px solid #999;">&nbsp; &nbsp; <span style="color: #FF8000;">Private</span> Source <span style="color: #FF8000;">As</span> <span style="color: #FF8000;">String</span></li><li style="padding: 0 5px; background-color: #fff; line-height: 16px; border-bottom: 1px solid #efefef; border-left: 1px solid #999;">&nbsp; &nbsp; <span style="color: #FF8000;">Private</span> PetCount <span style="color: #FF8000;">As</span> <span style="color: #FF0000;">Integer</span></li><li style="padding: 0 5px; background-color: #f9f9f9; line-height: 16px; border-bottom: 1px solid #efefef; border-left: 1px solid #999;">&nbsp; &nbsp; <span style="color: #FF8000;">Private</span> bAdopt <span style="color: #FF8000;">As</span> <span style="color: #FF0000;">Boolean</span></li><li style="padding: 0 5px; background-color: #fff; line-height: 16px; border-bottom: 1px solid #efefef; border-left: 1px solid #999;">&nbsp; &nbsp; <span style="color: #FF8000;">Private</span> UseProxy <span style="color: #FF8000;">As</span> <span style="color: #FF0000;">Boolean</span></li><li style="padding: 0 5px; background-color: #f9f9f9; line-height: 16px; border-bottom: 1px solid #efefef; border-left: 1px solid #999;">&nbsp; &nbsp; <span style="color: #FF8000;">Private</span> LoginThread <span style="color: #FF8000;">As</span> Thread</li><li style="padding: 0 5px; background-color: #fff; line-height: 16px; border-bottom: 1px solid #efefef; border-left: 1px solid #999;">&nbsp; &nbsp; <span style="color: #FF8000;">Private</span> AdoptThread <span style="color: #FF8000;">As</span> Thread</li><li style="padding: 0 5px; background-color: #f9f9f9; line-height: 16px; border-bottom: 1px solid #efefef; border-left: 1px solid #999;">&nbsp; &nbsp; <span style="color: #FF8000;">Private</span> boolCancelThread <span style="color: #FF8000;">As</span> <span style="color: #FF0000;">Boolean</span></li><li style="padding: 0 5px; background-color: #fff; line-height: 16px; border-bottom: 1px solid #efefef; border-left: 1px solid #999;">&nbsp; &nbsp; <span style="color: #FF8000;">Private</span> <span style="color: #0600FF;">Delegate</span> <span style="color: #0600FF;">Sub</span> EnableUIDelegate<span style="color: #000000;">(</span><span style="color: #FF8000;">ByVal</span> Value <span style="color: #FF8000;">As</span> <span style="color: #FF0000;">Boolean</span><span style="color: #000000;">)</span></li><li style="padding: 0 5px; background-color: #f9f9f9; line-height: 16px; border-bottom: 1px solid #efefef; border-left: 1px solid #999;">&nbsp; &nbsp; <span style="color: #FF8000;">Private</span> <span style="color: #0600FF;">Delegate</span> <span style="color: #0600FF;">Sub</span> SetTextDelegate<span style="color: #000000;">(</span><span style="color: #FF8000;">ByVal</span> MyControl <span style="color: #FF8000;">As</span> System.<span style="color: #0000FF;">Windows</span>.<span style="color: #0000FF;">Forms</span>.<span style="color: #0000FF;">Control</span>, <span style="color: #FF8000;">ByVal</span> Message <span style="color: #FF8000;">As</span> <span style="color: #FF8000;">String</span><span style="color: #000000;">)</span></li><li style="padding: 0 5px; background-color: #fff; line-height: 16px; border-bottom: 1px solid #efefef; border-left: 1px solid #999;">&nbsp; &nbsp; <span style="color: #FF8000;">Private</span> <span style="color: #0600FF;">Delegate</span> <span style="color: #0600FF;">Sub</span> SetToolTextDelegate<span style="color: #000000;">(</span><span style="color: #FF8000;">ByVal</span> MyControl <span style="color: #FF8000;">As</span> System.<span style="color: #0000FF;">Windows</span>.<span style="color: #0000FF;">Forms</span>.<span style="color: #0000FF;">ToolStripStatusLabel</span>, <span style="color: #FF8000;">ByVal</span> Message <span style="color: #FF8000;">As</span> <span style="color: #FF8000;">String</span><span style="color: #000000;">)</span></li><li style="padding: 0 5px; background-color: #f9f9f9; line-height: 16px; border-bottom: 1px solid #efefef; border-left: 1px solid #999;">&nbsp; &nbsp; <span style="color: #FF8000;">Private</span> <span style="color: #0600FF;">Sub</span> btnLogin_Click<span style="color: #000000;">(</span><span style="color: #FF8000;">ByVal</span> sender <span style="color: #FF8000;">As</span> System.<span style="color: #FF0000;">Object</span>, <span style="color: #FF8000;">ByVal</span> e <span style="color: #FF8000;">As</span> System.<span style="color: #0000FF;">EventArgs</span><span style="color: #000000;">)</span> <span style="color: #FF8000;">Handles</span> btnLogin.<span style="color: #0000FF;">Click</span></li><li style="padding: 0 5px; background-color: #fff; line-height: 16px; border-bottom: 1px solid #efefef; border-left: 1px solid #999;">&nbsp; &nbsp; &nbsp; &nbsp; EnableUI<span style="color: #000000;">(</span><span style="color: #0600FF;">False</span><span style="color: #000000;">)</span></li><li style="padding: 0 5px; background-color: #f9f9f9; line-height: 16px; border-bottom: 1px solid #efefef; border-left: 1px solid #999;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #FF8000;">Me</span>.<span style="color: #0000FF;">LoginThread</span> = <span style="color: #FF8000;">New</span> System.<span style="color: #0000FF;">Threading</span>.<span style="color: #0000FF;">Thread</span><span style="color: #000000;">(</span><span style="color: #804040;">AddressOf</span> Login<span style="color: #000000;">)</span></li><li style="padding: 0 5px; background-color: #fff; line-height: 16px; border-bottom: 1px solid #efefef; border-left: 1px solid #999;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #FF8000;">Me</span>.<span style="color: #0000FF;">LoginThread</span>.<span style="color: #0000FF;">IsBackground</span> = <span style="color: #0600FF;">True</span></li><li style="padding: 0 5px; background-color: #f9f9f9; line-height: 16px; border-bottom: 1px solid #efefef; border-left: 1px solid #999;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #FF8000;">Me</span>.<span style="color: #0000FF;">LoginThread</span>.<span style="color: #0000FF;">Start</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span></li><li style="padding: 0 5px; background-color: #fff; line-height: 16px; border-bottom: 1px solid #efefef; border-left: 1px solid #999;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #FF8000;">Me</span>.<span style="color: #0000FF;">EnableUI</span><span style="color: #000000;">(</span><span style="color: #0600FF;">True</span><span style="color: #000000;">)</span></li><li style="padding: 0 5px; background-color: #f9f9f9; line-height: 16px; border-bottom: 1px solid #efefef; border-left: 1px solid #999;">&nbsp; &nbsp; <span style="color: #0600FF;">End</span> <span style="color: #0600FF;">Sub</span></li><li style="padding: 0 5px; background-color: #fff; line-height: 16px; border-bottom: 1px solid #efefef; border-left: 1px solid #999;">&nbsp; &nbsp; <span style="color: #FF8000;">Private</span> <span style="color: #0600FF;">Sub</span> Login<span style="color: #000000;">(</span><span style="color: #000000;">)</span></li><li style="padding: 0 5px; background-color: #f9f9f9; line-height: 16px; border-bottom: 1px solid #efefef; border-left: 1px solid #999;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0600FF;">Dim</span> Username <span style="color: #FF8000;">As</span> <span style="color: #FF8000;">String</span> = <span style="color: #808080;">""</span></li><li style="padding: 0 5px; background-color: #fff; line-height: 16px; border-bottom: 1px solid #efefef; border-left: 1px solid #999;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0600FF;">Dim</span> Petname <span style="color: #FF8000;">As</span> <span style="color: #FF8000;">String</span> = <span style="color: #808080;">""</span></li><li style="padding: 0 5px; background-color: #f9f9f9; line-height: 16px; border-bottom: 1px solid #efefef; border-left: 1px solid #999;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0600FF;">Dim</span> Neopoints <span style="color: #FF8000;">As</span> <span style="color: #FF8000;">String</span> = <span style="color: #808080;">""</span></li><li style="padding: 0 5px; background-color: #fff; line-height: 16px; border-bottom: 1px solid #efefef; border-left: 1px solid #999;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0600FF;">Dim</span> PetCount <span style="color: #FF8000;">As</span> <span style="color: #FF0000;">Integer</span> = <span style="color: #FF0000;">0</span></li><li style="padding: 0 5px; background-color: #f9f9f9; line-height: 16px; border-bottom: 1px solid #efefef; border-left: 1px solid #999;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0600FF;">If</span> btnLogin.<span style="color: #0000FF;">Text</span> = <span style="color: #808080;">"Login"</span> <span style="color: #FF8000;">Then</span></li><li style="padding: 0 5px; background-color: #fff; line-height: 16px; border-bottom: 1px solid #efefef; border-left: 1px solid #999;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0600FF;">If</span> chkProxy.<span style="color: #0000FF;">Checked</span> = <span style="color: #0600FF;">True</span> <span style="color: #FF8000;">Then</span></li><li style="padding: 0 5px; background-color: #f9f9f9; line-height: 16px; border-bottom: 1px solid #efefef; border-left: 1px solid #999;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; UseProxy = <span style="color: #0600FF;">True</span></li><li style="padding: 0 5px; background-color: #fff; line-height: 16px; border-bottom: 1px solid #efefef; border-left: 1px solid #999;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Wrapper.<span style="color: #0000FF;">ProxyHost</span> = txtHost.<span style="color: #0000FF;">Text</span></li><li style="padding: 0 5px; background-color: #f9f9f9; line-height: 16px; border-bottom: 1px solid #efefef; border-left: 1px solid #999;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Wrapper.<span style="color: #0000FF;">ProxyPort</span> = txtPort.<span style="color: #0000FF;">Text</span></li><li style="padding: 0 5px; background-color: #fff; line-height: 16px; border-bottom: 1px solid #efefef; border-left: 1px solid #999;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #FF8000;">Else</span></li><li style="padding: 0 5px; background-color: #f9f9f9; line-height: 16px; border-bottom: 1px solid #efefef; border-left: 1px solid #999;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; UseProxy = <span style="color: #0600FF;">False</span></li><li style="padding: 0 5px; background-color: #fff; line-height: 16px; border-bottom: 1px solid #efefef; border-left: 1px solid #999;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0600FF;">End</span> <span style="color: #0600FF;">If</span></li><li style="padding: 0 5px; background-color: #f9f9f9; line-height: 16px; border-bottom: 1px solid #efefef; border-left: 1px solid #999;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Source = Wrapper.<span style="color: #0000FF;">Login</span><span style="color: #000000;">(</span>txtUsername.<span style="color: #0000FF;">Text</span>, txtpassword.<span style="color: #0000FF;">Text</span>, UseProxy<span style="color: #000000;">)</span></li><li style="padding: 0 5px; background-color: #fff; line-height: 16px; border-bottom: 1px solid #efefef; border-left: 1px solid #999;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0600FF;">If</span> chkProxy.<span style="color: #0000FF;">Checked</span> = <span style="color: #0600FF;">True</span> <span style="color: #FF8000;">Then</span></li><li style="padding: 0 5px; background-color: #f9f9f9; line-height: 16px; border-bottom: 1px solid #efefef; border-left: 1px solid #999;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Wrapper.<span style="color: #0000FF;">UseProxy</span> = <span style="color: #0600FF;">False</span></li><li style="padding: 0 5px; background-color: #fff; line-height: 16px; border-bottom: 1px solid #efefef; border-left: 1px solid #999;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #008080; font-style: italic;">'chkProxy.Checked = False</span></li><li style="padding: 0 5px; background-color: #f9f9f9; line-height: 16px; border-bottom: 1px solid #efefef; border-left: 1px solid #999;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0600FF;">End</span> <span style="color: #0600FF;">If</span></li><li style="padding: 0 5px; background-color: #fff; line-height: 16px; border-bottom: 1px solid #efefef; border-left: 1px solid #999;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Username = GetString<span style="color: #000000;">(</span>Source, <span style="color: #808080;">"Welcome, <a class=tl href=/randomfriend.phtml?user="</span>, <span style="color: #808080;">">"</span><span style="color: #000000;">)</span></li><li style="padding: 0 5px; background-color: #f9f9f9; line-height: 16px; border-bottom: 1px solid #efefef; border-left: 1px solid #999;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Petname = GetString<span style="color: #000000;">(</span>Source, <span style="color: #808080;">"Pet : <a class=tl href=/quickref.phtml>"</span>, <span style="color: #808080;">"</a>"</span><span style="color: #000000;">)</span></li><li style="padding: 0 5px; background-color: #fff; line-height: 16px; border-bottom: 1px solid #efefef; border-left: 1px solid #999;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Neopoints = GetString<span style="color: #000000;">(</span>Source, <span style="color: #808080;">"NP : <a class=tl href=/objects.phtml?type=inventory>"</span>, <span style="color: #808080;">"</a>"</span><span style="color: #000000;">)</span></li><li style="padding: 0 5px; background-color: #f9f9f9; line-height: 16px; border-bottom: 1px solid #efefef; border-left: 1px solid #999;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0600FF;">If</span> <span style="color: #0600FF;">LCase</span><span style="color: #000000;">(</span>Username<span style="color: #000000;">)</span> = <span style="color: #0600FF;">LCase</span><span style="color: #000000;">(</span>txtUsername.<span style="color: #0000FF;">Text</span>.<span style="color: #0000FF;">ToString</span><span style="color: #000000;">)</span> <span style="color: #FF8000;">Then</span></li><li style="padding: 0 5px; background-color: #fff; line-height: 16px; border-bottom: 1px solid #efefef; border-left: 1px solid #999;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; SetText<span style="color: #000000;">(</span><span style="color: #FF8000;">Me</span>.<span style="color: #0000FF;">ToolStripStatusLabel1</span>, <span style="color: #808080;">"Username: "</span> & Username<span style="color: #000000;">)</span></li><li style="padding: 0 5px; background-color: #f9f9f9; line-height: 16px; border-bottom: 1px solid #efefef; border-left: 1px solid #999;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; SetText<span style="color: #000000;">(</span><span style="color: #FF8000;">Me</span>.<span style="color: #0000FF;">ToolStripStatusLabel2</span>, <span style="color: #808080;">"Neopoints: "</span> & Neopoints<span style="color: #000000;">)</span></li><li style="padding: 0 5px; background-color: #fff; line-height: 16px; border-bottom: 1px solid #efefef; border-left: 1px solid #999;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; PetCount = ExtractString<span style="color: #000000;">(</span>Source, <span style="color: #808080;">"<a href='http://www.neopets.com/~"</span>, <span style="color: #808080;">"'"</span><span style="color: #000000;">)</span></li><li style="padding: 0 5px; background-color: #f9f9f9; line-height: 16px; border-bottom: 1px solid #efefef; border-left: 1px solid #999;">&nbsp;</li><li style="padding: 0 5px; background-color: #fff; line-height: 16px; border-bottom: 1px solid #efefef; border-left: 1px solid #999;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; SetText<span style="color: #000000;">(</span><span style="color: #FF8000;">Me</span>.<span style="color: #0000FF;">ToolStripStatusLabel3</span>, <span style="color: #808080;">"Total Pets: "</span> & PetCount.<span style="color: #0000FF;">ToString</span><span style="color: #000000;">)</span></li><li style="padding: 0 5px; background-color: #f9f9f9; line-height: 16px; border-bottom: 1px solid #efefef; border-left: 1px solid #999;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #FF8000;">Else</span></li><li style="padding: 0 5px; background-color: #fff; line-height: 16px; border-bottom: 1px solid #efefef; border-left: 1px solid #999;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0600FF;">MsgBox</span><span style="color: #000000;">(</span><span style="color: #808080;">"Something went wrong, please check your information again. If you are using a proxy please make sure that it is working."</span><span style="color: #000000;">)</span></li><li style="padding: 0 5px; background-color: #f9f9f9; line-height: 16px; border-bottom: 1px solid #efefef; border-left: 1px solid #999;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0600FF;">End</span> <span style="color: #0600FF;">If</span></li><li style="padding: 0 5px; background-color: #fff; line-height: 16px; border-bottom: 1px solid #efefef; border-left: 1px solid #999;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0600FF;">End</span> <span style="color: #0600FF;">If</span></li><li style="padding: 0 5px; background-color: #f9f9f9; line-height: 16px; border-bottom: 1px solid #efefef; border-left: 1px solid #999;">&nbsp; &nbsp; <span style="color: #0600FF;">End</span> <span style="color: #0600FF;">Sub</span></li><li style="padding: 0 5px; background-color: #fff; line-height: 16px; border-bottom: 1px solid #efefef; border-left: 1px solid #999;">&nbsp; &nbsp; <span style="color: #FF8000;">Public</span> <span style="color: #0600FF;">Function</span> ExtractString<span style="color: #000000;">(</span><span style="color: #FF8000;">ByVal</span> Source <span style="color: #FF8000;">As</span> <span style="color: #FF8000;">String</span>, _</li><li style="padding: 0 5px; background-color: #f9f9f9; line-height: 16px; border-bottom: 1px solid #efefef; border-left: 1px solid #999;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #FF8000;">ByVal</span> start <span style="color: #FF8000;">As</span> <span style="color: #FF8000;">String</span>, _</li><li style="padding: 0 5px; background-color: #fff; line-height: 16px; border-bottom: 1px solid #efefef; border-left: 1px solid #999;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #FF8000;">ByVal</span> Ending <span style="color: #FF8000;">As</span> <span style="color: #FF8000;">String</span><span style="color: #000000;">)</span> <span style="color: #FF8000;">As</span> <span style="color: #FF0000;">Integer</span></li><li style="padding: 0 5px; background-color: #f9f9f9; line-height: 16px; border-bottom: 1px solid #efefef; border-left: 1px solid #999;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0600FF;">Dim</span> X <span style="color: #FF8000;">As</span> <span style="color: #FF0000;">Integer</span></li><li style="padding: 0 5px; background-color: #fff; line-height: 16px; border-bottom: 1px solid #efefef; border-left: 1px solid #999;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0600FF;">Dim</span> Y <span style="color: #FF8000;">As</span> <span style="color: #FF0000;">Integer</span></li><li style="padding: 0 5px; background-color: #f9f9f9; line-height: 16px; border-bottom: 1px solid #efefef; border-left: 1px solid #999;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0600FF;">Dim</span> Length <span style="color: #FF8000;">As</span> <span style="color: #FF0000;">Long</span></li><li style="padding: 0 5px; background-color: #fff; line-height: 16px; border-bottom: 1px solid #efefef; border-left: 1px solid #999;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0600FF;">Dim</span> Result <span style="color: #FF8000;">As</span> <span style="color: #FF8000;">String</span></li><li style="padding: 0 5px; background-color: #f9f9f9; line-height: 16px; border-bottom: 1px solid #efefef; border-left: 1px solid #999;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0600FF;">Dim</span> Count <span style="color: #FF8000;">As</span> <span style="color: #FF0000;">Integer</span></li><li style="padding: 0 5px; background-color: #fff; line-height: 16px; border-bottom: 1px solid #efefef; border-left: 1px solid #999;">&nbsp;</li><li style="padding: 0 5px; background-color: #f9f9f9; line-height: 16px; border-bottom: 1px solid #efefef; border-left: 1px solid #999;">&nbsp; &nbsp; &nbsp; &nbsp; Count = <span style="color: #FF0000;">0</span></li><li style="padding: 0 5px; background-color: #fff; line-height: 16px; border-bottom: 1px solid #efefef; border-left: 1px solid #999;">&nbsp; &nbsp; &nbsp; &nbsp; Length = <span style="color: #FF8000;">Len</span><span style="color: #000000;">(</span>start<span style="color: #000000;">)</span></li><li style="padding: 0 5px; background-color: #f9f9f9; line-height: 16px; border-bottom: 1px solid #efefef; border-left: 1px solid #999;">&nbsp; &nbsp; &nbsp; &nbsp; X = <span style="color: #0600FF;">InStr</span><span style="color: #000000;">(</span>Source, start<span style="color: #000000;">)</span></li><li style="padding: 0 5px; background-color: #fff; line-height: 16px; border-bottom: 1px solid #efefef; border-left: 1px solid #999;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0600FF;">Do</span> Until X = <span style="color: #FF0000;">0</span></li><li style="padding: 0 5px; background-color: #f9f9f9; line-height: 16px; border-bottom: 1px solid #efefef; border-left: 1px solid #999;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; X = X + Length</li><li style="padding: 0 5px; background-color: #fff; line-height: 16px; border-bottom: 1px solid #efefef; border-left: 1px solid #999;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Y = <span style="color: #0600FF;">InStr</span><span style="color: #000000;">(</span>X, Source, Ending<span style="color: #000000;">)</span></li><li style="padding: 0 5px; background-color: #f9f9f9; line-height: 16px; border-bottom: 1px solid #efefef; border-left: 1px solid #999;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0600FF;">If</span> Y = <span style="color: #FF0000;">0</span> <span style="color: #FF8000;">Then</span></li><li style="padding: 0 5px; background-color: #fff; line-height: 16px; border-bottom: 1px solid #efefef; border-left: 1px solid #999;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0600FF;">Exit</span> <span style="color: #0600FF;">Function</span></li><li style="padding: 0 5px; background-color: #f9f9f9; line-height: 16px; border-bottom: 1px solid #efefef; border-left: 1px solid #999;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0600FF;">End</span> <span style="color: #0600FF;">If</span></li><li style="padding: 0 5px; background-color: #fff; line-height: 16px; border-bottom: 1px solid #efefef; border-left: 1px solid #999;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Result = <span style="color: #FF8000;">Mid</span>$<span style="color: #000000;">(</span>Source, X, Y - X<span style="color: #000000;">)</span></li><li style="padding: 0 5px; background-color: #f9f9f9; line-height: 16px; border-bottom: 1px solid #efefef; border-left: 1px solid #999;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; X = <span style="color: #0600FF;">InStr</span><span style="color: #000000;">(</span>X, Source, start<span style="color: #000000;">)</span></li><li style="padding: 0 5px; background-color: #fff; line-height: 16px; border-bottom: 1px solid #efefef; border-left: 1px solid #999;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Count = Count + <span style="color: #FF0000;">1</span></li><li style="padding: 0 5px; background-color: #f9f9f9; line-height: 16px; border-bottom: 1px solid #efefef; border-left: 1px solid #999;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0600FF;">Loop</span></li><li style="padding: 0 5px; background-color: #fff; line-height: 16px; border-bottom: 1px solid #efefef; border-left: 1px solid #999;">&nbsp; &nbsp; &nbsp; &nbsp; Return Count</li><li style="padding: 0 5px; background-color: #f9f9f9; line-height: 16px; border-bottom: 1px solid #efefef; border-left: 1px solid #999;">&nbsp; &nbsp; <span style="color: #0600FF;">End</span> <span style="color: #0600FF;">Function</span></li><li style="padding: 0 5px; background-color: #fff; line-height: 16px; border-bottom: 1px solid #efefef; border-left: 1px solid #999;">&nbsp; &nbsp; <span style="color: #FF8000;">Private</span> <span style="color: #0600FF;">Sub</span> btnStart_Click<span style="color: #000000;">(</span><span style="color: #FF8000;">ByVal</span> sender <span style="color: #FF8000;">As</span> System.<span style="color: #FF0000;">Object</span>, <span style="color: #FF8000;">ByVal</span> e <span style="color: #FF8000;">As</span> System.<span style="color: #0000FF;">EventArgs</span><span style="color: #000000;">)</span> <span style="color: #FF8000;">Handles</span> btnStart.<span style="color: #0000FF;">Click</span></li><li style="padding: 0 5px; background-color: #f9f9f9; line-height: 16px; border-bottom: 1px solid #efefef; border-left: 1px solid #999;">&nbsp; &nbsp; &nbsp; &nbsp; EnableUI<span style="color: #000000;">(</span><span style="color: #0600FF;">False</span><span style="color: #000000;">)</span></li><li style="padding: 0 5px; background-color: #fff; line-height: 16px; border-bottom: 1px solid #efefef; border-left: 1px solid #999;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #FF8000;">Me</span>.<span style="color: #0000FF;">AdoptThread</span> = <span style="color: #FF8000;">New</span> System.<span style="color: #0000FF;">Threading</span>.<span style="color: #0000FF;">Thread</span><span style="color: #000000;">(</span><span style="color: #804040;">AddressOf</span> Adopt<span style="color: #000000;">)</span></li><li style="padding: 0 5px; background-color: #f9f9f9; line-height: 16px; border-bottom: 1px solid #efefef; border-left: 1px solid #999;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #FF8000;">Me</span>.<span style="color: #0000FF;">AdoptThread</span>.<span style="color: #0000FF;">IsBackground</span> = <span style="color: #0600FF;">True</span></li><li style="padding: 0 5px; background-color: #fff; line-height: 16px; border-bottom: 1px solid #efefef; border-left: 1px solid #999;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #FF8000;">Me</span>.<span style="color: #0000FF;">AdoptThread</span>.<span style="color: #0000FF;">Start</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span></li><li style="padding: 0 5px; background-color: #f9f9f9; line-height: 16px; border-bottom: 1px solid #efefef; border-left: 1px solid #999;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #FF8000;">Me</span>.<span style="color: #0000FF;">EnableUI</span><span style="color: #000000;">(</span><span style="color: #0600FF;">True</span><span style="color: #000000;">)</span></li><li style="padding: 0 5px; background-color: #fff; line-height: 16px; border-bottom: 1px solid #efefef; border-left: 1px solid #999;">&nbsp; &nbsp; <span style="color: #0600FF;">End</span> <span style="color: #0600FF;">Sub</span></li><li style="padding: 0 5px; background-color: #f9f9f9; line-height: 16px; border-bottom: 1px solid #efefef; border-left: 1px solid #999;">&nbsp; &nbsp; <span style="color: #FF8000;">Private</span> <span style="color: #0600FF;">Sub</span> Adopt<span style="color: #000000;">(</span><span style="color: #000000;">)</span></li><li style="padding: 0 5px; background-color: #fff; line-height: 16px; border-bottom: 1px solid #efefef; border-left: 1px solid #999;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0600FF;">Dim</span> Level <span style="color: #FF8000;">As</span> <span style="color: #FF0000;">Integer</span> = <span style="color: #FF0000;">0</span></li><li style="padding: 0 5px; background-color: #f9f9f9; line-height: 16px; border-bottom: 1px solid #efefef; border-left: 1px solid #999;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0600FF;">Dim</span> Strength <span style="color: #FF8000;">As</span> <span style="color: #FF0000;">Integer</span> = <span style="color: #FF0000;">0</span></li><li style="padding: 0 5px; background-color: #fff; line-height: 16px; border-bottom: 1px solid #efefef; border-left: 1px solid #999;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0600FF;">Dim</span> Defence <span style="color: #FF8000;">As</span> <span style="color: #FF0000;">Integer</span> = <span style="color: #FF0000;">0</span></li><li style="padding: 0 5px; background-color: #f9f9f9; line-height: 16px; border-bottom: 1px solid #efefef; border-left: 1px solid #999;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0600FF;">Dim</span> Cost <span style="color: #FF8000;">As</span> <span style="color: #FF8000;">String</span> = <span style="color: #FF0000;">0</span></li><li style="padding: 0 5px; background-color: #fff; line-height: 16px; border-bottom: 1px solid #efefef; border-left: 1px solid #999;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0600FF;">Dim</span> Gender <span style="color: #FF8000;">As</span> <span style="color: #FF8000;">String</span> = <span style="color: #808080;">""</span></li><li style="padding: 0 5px; background-color: #f9f9f9; line-height: 16px; border-bottom: 1px solid #efefef; border-left: 1px solid #999;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0600FF;">Dim</span> PetName <span style="color: #FF8000;">As</span> <span style="color: #FF8000;">String</span> = <span style="color: #808080;">""</span></li><li style="padding: 0 5px; background-color: #fff; line-height: 16px; border-bottom: 1px solid #efefef; border-left: 1px solid #999;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0600FF;">Dim</span> AdoptURL <span style="color: #FF8000;">As</span> <span style="color: #FF8000;">String</span> = <span style="color: #808080;">""</span></li><li style="padding: 0 5px; background-color: #f9f9f9; line-height: 16px; border-bottom: 1px solid #efefef; border-left: 1px solid #999;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0600FF;">If</span> bAdopt = <span style="color: #0600FF;">True</span> <span style="color: #FF8000;">Then</span></li><li style="padding: 0 5px; background-color: #fff; line-height: 16px; border-bottom: 1px solid #efefef; border-left: 1px solid #999;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; bAdopt = <span style="color: #0600FF;">False</span></li><li style="padding: 0 5px; background-color: #f9f9f9; line-height: 16px; border-bottom: 1px solid #efefef; border-left: 1px solid #999;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #FF8000;">Else</span></li><li style="padding: 0 5px; background-color: #fff; line-height: 16px; border-bottom: 1px solid #efefef; border-left: 1px solid #999;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; bAdopt = <span style="color: #0600FF;">True</span></li><li style="padding: 0 5px; background-color: #f9f9f9; line-height: 16px; border-bottom: 1px solid #efefef; border-left: 1px solid #999;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0600FF;">End</span> <span style="color: #0600FF;">If</span></li><li style="padding: 0 5px; background-color: #fff; line-height: 16px; border-bottom: 1px solid #efefef; border-left: 1px solid #999;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0600FF;">If</span> btnStart.<span style="color: #0000FF;">Text</span> = <span style="color: #808080;">"Start"</span> <span style="color: #FF8000;">Then</span></li><li style="padding: 0 5px; background-color: #f9f9f9; line-height: 16px; border-bottom: 1px solid #efefef; border-left: 1px solid #999;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; SetText<span style="color: #000000;">(</span><span style="color: #FF8000;">Me</span>.<span style="color: #0000FF;">btnStart</span>, <span style="color: #808080;">"Stop"</span><span style="color: #000000;">)</span></li><li style="padding: 0 5px; background-color: #fff; line-height: 16px; border-bottom: 1px solid #efefef; border-left: 1px solid #999;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Source = Wrapper.<span style="color: #0000FF;">EazyNeo</span><span style="color: #000000;">(</span><span style="color: #808080;">"GET"</span>, <span style="color: #808080;">"http://www.neopets.com/pound.phtml"</span>, <span style="color: #808080;">"http://www.neopets.com/petcentral.phtml"</span><span style="color: #000000;">)</span></li><li style="padding: 0 5px; background-color: #f9f9f9; line-height: 16px; border-bottom: 1px solid #efefef; border-left: 1px solid #999;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Source = Wrapper.<span style="color: #0000FF;">EazyNeo</span><span style="color: #000000;">(</span><span style="color: #808080;">"GET"</span>, <span style="color: #808080;">"http://www.neopets.com/adopt.phtml"</span>, <span style="color: #808080;">"http://www.neopets.com/pound.phtml"</span><span style="color: #000000;">)</span></li><li style="padding: 0 5px; background-color: #fff; line-height: 16px; border-bottom: 1px solid #efefef; border-left: 1px solid #999;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0600FF;">Do</span> Until bAdopt = <span style="color: #0600FF;">False</span></li><li style="padding: 0 5px; background-color: #f9f9f9; line-height: 16px; border-bottom: 1px solid #efefef; border-left: 1px solid #999;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0600FF;">If</span> PetCount < <span style="color: #FF0000;">4</span> <span style="color: #FF8000;">Then</span></li><li style="padding: 0 5px; background-color: #fff; line-height: 16px; border-bottom: 1px solid #efefef; border-left: 1px solid #999;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0600FF;">If</span> <span style="color: #0600FF;">InStr</span><span style="color: #000000;">(</span>Source, <span style="color: #808080;">"</B> Neopoints to adopt!<BR><BR>"</span>, vbTextCompare<span style="color: #000000;">)</span> <> <span style="color: #FF0000;">0</span> <span style="color: #FF8000;">Then</span></li><li style="padding: 0 5px; background-color: #f9f9f9; line-height: 16px; border-bottom: 1px solid #efefef; border-left: 1px solid #999;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; PetName = GetString<span style="color: #000000;">(</span>Source, <span style="color: #808080;">"</B> Neopoints to adopt!<BR><BR>"</span>, <span style="color: #808080;">" is <SPAN"</span><span style="color: #000000;">)</span></li><li style="padding: 0 5px; background-color: #fff; line-height: 16px; border-bottom: 1px solid #efefef; border-left: 1px solid #999;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Level = GetString<span style="color: #000000;">(</span>Source, <span style="color: #808080;">"level <B>"</span>, <span style="color: #808080;">"<"</span><span style="color: #000000;">)</span></li><li style="padding: 0 5px; background-color: #f9f9f9; line-height: 16px; border-bottom: 1px solid #efefef; border-left: 1px solid #999;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Defence = GetString<span style="color: #000000;">(</span>Source, <span style="color: #808080;">"defence of <B>"</span>, <span style="color: #808080;">"<"</span><span style="color: #000000;">)</span></li><li style="padding: 0 5px; background-color: #fff; line-height: 16px; border-bottom: 1px solid #efefef; border-left: 1px solid #999;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Cost = GetString<span style="color: #000000;">(</span>Source, <span style="color: #808080;">"and costs <B>"</span>, <span style="color: #808080;">"<"</span><span style="color: #000000;">)</span></li><li style="padding: 0 5px; background-color: #f9f9f9; line-height: 16px; border-bottom: 1px solid #efefef; border-left: 1px solid #999;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Gender = GetString<span style="color: #000000;">(</span>Source, <span style="color: #808080;">";"</span><span style="color: #808080;">"><B>"</span>, <span style="color: #808080;">"<"</span><span style="color: #000000;">)</span></li><li style="padding: 0 5px; background-color: #fff; line-height: 16px; border-bottom: 1px solid #efefef; border-left: 1px solid #999;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Strength = GetString<span style="color: #000000;">(</span>Source, <span style="color: #808080;">"strength of <B>"</span>, <span style="color: #808080;">"<"</span><span style="color: #000000;">)</span></li><li style="padding: 0 5px; background-color: #f9f9f9; line-height: 16px; border-bottom: 1px solid #efefef; border-left: 1px solid #999;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0600FF;">If</span> <span style="color: #0600FF;">Val</span><span style="color: #000000;">(</span>Level<span style="color: #000000;">)</span> >= <span style="color: #0600FF;">Val</span><span style="color: #000000;">(</span>txtLevel.<span style="color: #0000FF;">Text</span><span style="color: #000000;">)</span> <span style="color: #804040;">And</span> <span style="color: #0600FF;">Val</span><span style="color: #000000;">(</span>Defence<span style="color: #000000;">)</span> >= <span style="color: #0600FF;">Val</span><span style="color: #000000;">(</span>txtDefense.<span style="color: #0000FF;">Text</span><span style="color: #000000;">)</span> <span style="color: #804040;">And</span> <span style="color: #0600FF;">Val</span><span style="color: #000000;">(</span>Cost<span style="color: #000000;">)</span> <= <span style="color: #0600FF;">Val</span><span style="color: #000000;">(</span>txtCost.<span style="color: #0000FF;">Text</span><span style="color: #000000;">)</span> <span style="color: #804040;">And</span> <span style="color: #0600FF;">Val</span><span style="color: #000000;">(</span>Strength<span style="color: #000000;">)</span> >= <span style="color: #0600FF;">Val</span><span style="color: #000000;">(</span>txtStrength.<span style="color: #0000FF;">Text</span><span style="color: #000000;">)</span> <span style="color: #FF8000;">Then</span></li><li style="padding: 0 5px; background-color: #fff; line-height: 16px; border-bottom: 1px solid #efefef; border-left: 1px solid #999;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0600FF;">If</span> txtGender.<span style="color: #0000FF;">Text</span> = Gender <span style="color: #FF8000;">Then</span></li><li style="padding: 0 5px; background-color: #f9f9f9; line-height: 16px; border-bottom: 1px solid #efefef; border-left: 1px solid #999;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; AdoptURL = GetString<span style="color: #000000;">(</span>Source, <span style="color: #808080;">"<BR><BR><INPUT type="</span><span style="color: #808080;">"submit"</span><span style="color: #808080;">" value="</span><span style="color: #808080;">""</span>, <span style="color: #808080;">""</span><span style="color: #808080;">">"</span><span style="color: #000000;">)</span></li><li style="padding: 0 5px; background-color: #fff; line-height: 16px; border-bottom: 1px solid #efefef; border-left: 1px solid #999;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Wrapper.<span style="color: #0000FF;">EazyNeo</span><span style="color: #000000;">(</span><span style="color: #808080;">"GET"</span>, <span style="color: #808080;">"http://www.neopets.com/process_adopt.phtml?pet_name="</span> & PetName, <span style="color: #808080;">"http://www.neopets.com/adopt.phtml"</span><span style="color: #000000;">)</span></li><li style="padding: 0 5px; background-color: #f9f9f9; line-height: 16px; border-bottom: 1px solid #efefef; border-left: 1px solid #999;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Source = Wrapper.<span style="color: #0000FF;">EazyNeo</span><span style="color: #000000;">(</span><span style="color: #808080;">"GET"</span>, <span style="color: #808080;">"http://www.neopets.com/quickref.phtml"</span>, <span style="color: #808080;">"http://www.neopets.com/adopt.phtml"</span><span style="color: #000000;">)</span></li><li style="padding: 0 5px; background-color: #fff; line-height: 16px; border-bottom: 1px solid #efefef; border-left: 1px solid #999;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0600FF;">If</span> <span style="color: #0600FF;">InStr</span><span style="color: #000000;">(</span>Source, PetName, CompareMethod.<span style="color: #0000FF;">Text</span><span style="color: #000000;">)</span> <> <span style="color: #FF0000;">0</span> <span style="color: #FF8000;">Then</span></li><li style="padding: 0 5px; background-color: #f9f9f9; line-height: 16px; border-bottom: 1px solid #efefef; border-left: 1px solid #999;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; PetCount = PetCount + <span style="color: #FF0000;">1</span></li><li style="padding: 0 5px; background-color: #fff; line-height: 16px; border-bottom: 1px solid #efefef; border-left: 1px solid #999;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0600FF;">End</span> <span style="color: #0600FF;">If</span></li><li style="padding: 0 5px; background-color: #f9f9f9; line-height: 16px; border-bottom: 1px solid #efefef; border-left: 1px solid #999;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ElseIf txtGender.<span style="color: #0000FF;">Text</span> = <span style="color: #808080;">""</span> <span style="color: #FF8000;">Then</span></li><li style="padding: 0 5px; background-color: #fff; line-height: 16px; border-bottom: 1px solid #efefef; border-left: 1px solid #999;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; AdoptURL = GetString<span style="color: #000000;">(</span>Source, <span style="color: #808080;">"<BR><BR><INPUT type="</span><span style="color: #808080;">"submit"</span><span style="color: #808080;">" value="</span><span style="color: #808080;">""</span>, <span style="color: #808080;">""</span><span style="color: #808080;">">"</span><span style="color: #000000;">)</span></li><li style="padding: 0 5px; background-color: #f9f9f9; line-height: 16px; border-bottom: 1px solid #efefef; border-left: 1px solid #999;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Wrapper.<span style="color: #0000FF;">EazyNeo</span><span style="color: #000000;">(</span><span style="color: #808080;">"GET"</span>, <span style="color: #808080;">"http://www.neopets.com/process_adopt.phtml?pet_name="</span> & PetName, <span style="color: #808080;">"http://www.neopets.com/adopt.phtml"</span><span style="color: #000000;">)</span></li><li style="padding: 0 5px; background-color: #fff; line-height: 16px; border-bottom: 1px solid #efefef; border-left: 1px solid #999;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Source = Wrapper.<span style="color: #0000FF;">EazyNeo</span><span style="color: #000000;">(</span><span style="color: #808080;">"GET"</span>, <span style="color: #808080;">"http://www.neopets.com/quickref.phtml"</span>, <span style="color: #808080;">"http://www.neopets.com/adopt.phtml"</span><span style="color: #000000;">)</span></li><li style="padding: 0 5px; background-color: #f9f9f9; line-height: 16px; border-bottom: 1px solid #efefef; border-left: 1px solid #999;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0600FF;">If</span> <span style="color: #0600FF;">InStr</span><span style="color: #000000;">(</span>Source, PetName, CompareMethod.<span style="color: #0000FF;">Text</span><span style="color: #000000;">)</span> <> <span style="color: #FF0000;">0</span> <span style="color: #FF8000;">Then</span></li><li style="padding: 0 5px; background-color: #fff; line-height: 16px; border-bottom: 1px solid #efefef; border-left: 1px solid #999;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; PetCount = PetCount + <span style="color: #FF0000;">1</span></li><li style="padding: 0 5px; background-color: #f9f9f9; line-height: 16px; border-bottom: 1px solid #efefef; border-left: 1px solid #999;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0600FF;">End</span> <span style="color: #0600FF;">If</span></li><li style="padding: 0 5px; background-color: #fff; line-height: 16px; border-bottom: 1px solid #efefef; border-left: 1px solid #999;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #FF8000;">Else</span></li><li style="padding: 0 5px; background-color: #f9f9f9; line-height: 16px; border-bottom: 1px solid #efefef; border-left: 1px solid #999;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Wrapper.<span style="color: #0000FF;">Pause</span><span style="color: #000000;">(</span><span style="color: #FF0000;">100</span><span style="color: #000000;">)</span></li><li style="padding: 0 5px; background-color: #fff; line-height: 16px; border-bottom: 1px solid #efefef; border-left: 1px solid #999;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0600FF;">End</span> <span style="color: #0600FF;">If</span></li><li style="padding: 0 5px; background-color: #f9f9f9; line-height: 16px; border-bottom: 1px solid #efefef; border-left: 1px solid #999;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #FF8000;">Else</span></li><li style="padding: 0 5px; background-color: #fff; line-height: 16px; border-bottom: 1px solid #efefef; border-left: 1px solid #999;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Wrapper.<span style="color: #0000FF;">Pause</span><span style="color: #000000;">(</span><span style="color: #FF0000;">100</span><span style="color: #000000;">)</span></li><li style="padding: 0 5px; background-color: #f9f9f9; line-height: 16px; border-bottom: 1px solid #efefef; border-left: 1px solid #999;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0600FF;">End</span> <span style="color: #0600FF;">If</span></li><li style="padding: 0 5px; background-color: #fff; line-height: 16px; border-bottom: 1px solid #efefef; border-left: 1px solid #999;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0600FF;">End</span> <span style="color: #0600FF;">If</span></li><li style="padding: 0 5px; background-color: #f9f9f9; line-height: 16px; border-bottom: 1px solid #efefef; border-left: 1px solid #999;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #FF8000;">Else</span></li><li style="padding: 0 5px; background-color: #fff; line-height: 16px; border-bottom: 1px solid #efefef; border-left: 1px solid #999;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; SetText<span style="color: #000000;">(</span><span style="color: #FF8000;">Me</span>.<span style="color: #0000FF;">btnStart</span>, <span style="color: #808080;">"Start"</span><span style="color: #000000;">)</span></li><li style="padding: 0 5px; background-color: #f9f9f9; line-height: 16px; border-bottom: 1px solid #efefef; border-left: 1px solid #999;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0600FF;">MsgBox</span><span style="color: #000000;">(</span><span style="color: #808080;">"Either switch accounts or abandoned a pet!"</span>, MsgBoxStyle.<span style="color: #0600FF;">Exclamation</span>, <span style="color: #808080;">"You Cannot addopt any more pets!"</span><span style="color: #000000;">)</span></li><li style="padding: 0 5px; background-color: #fff; line-height: 16px; border-bottom: 1px solid #efefef; border-left: 1px solid #999;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; bAdopt = <span style="color: #0600FF;">False</span></li><li style="padding: 0 5px; background-color: #f9f9f9; line-height: 16px; border-bottom: 1px solid #efefef; border-left: 1px solid #999;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0600FF;">End</span> <span style="color: #0600FF;">If</span></li><li style="padding: 0 5px; background-color: #fff; line-height: 16px; border-bottom: 1px solid #efefef; border-left: 1px solid #999;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Source = Wrapper.<span style="color: #0000FF;">EazyNeo</span><span style="color: #000000;">(</span><span style="color: #808080;">"GET"</span>, <span style="color: #808080;">"http://www.neopets.com/adopt.phtml?"</span>, <span style="color: #808080;">"http://www.neopets.com/adopt.phtml"</span><span style="color: #000000;">)</span></li><li style="padding: 0 5px; background-color: #f9f9f9; line-height: 16px; border-bottom: 1px solid #efefef; border-left: 1px solid #999;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0600FF;">Loop</span></li><li style="padding: 0 5px; background-color: #fff; line-height: 16px; border-bottom: 1px solid #efefef; border-left: 1px solid #999;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #FF8000;">Else</span></li><li style="padding: 0 5px; background-color: #f9f9f9; line-height: 16px; border-bottom: 1px solid #efefef; border-left: 1px solid #999;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; SetText<span style="color: #000000;">(</span><span style="color: #FF8000;">Me</span>.<span style="color: #0000FF;">btnStart</span>, <span style="color: #808080;">"Start"</span><span style="color: #000000;">)</span></li><li style="padding: 0 5px; background-color: #fff; line-height: 16px; border-bottom: 1px solid #efefef; border-left: 1px solid #999;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0600FF;">End</span> <span style="color: #0600FF;">If</span></li><li style="padding: 0 5px; background-color: #f9f9f9; line-height: 16px; border-bottom: 1px solid #efefef; border-left: 1px solid #999;">&nbsp; &nbsp; <span style="color: #0600FF;">End</span> <span style="color: #0600FF;">Sub</span></li><li style="padding: 0 5px; background-color: #fff; line-height: 16px; border-bottom: 1px solid #efefef; border-left: 1px solid #999;">&nbsp; &nbsp; <span style="color: #FF8000;">Public</span> <span style="color: #0600FF;">Function</span> GetString<span style="color: #000000;">(</span><span style="color: #FF8000;">ByVal</span> InputText <span style="color: #FF8000;">As</span> <span style="color: #FF8000;">String</span>, _</li><li style="padding: 0 5px; background-color: #f9f9f9; line-height: 16px; border-bottom: 1px solid #efefef; border-left: 1px solid #999;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #FF8000;">ByVal</span> StartText <span style="color: #FF8000;">As</span> <span style="color: #FF8000;">String</span>, _</li><li style="padding: 0 5px; background-color: #fff; line-height: 16px; border-bottom: 1px solid #efefef; border-left: 1px solid #999;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #FF8000;">ByVal</span> EndText <span style="color: #FF8000;">As</span> <span style="color: #FF8000;">String</span>, _</li><li style="padding: 0 5px; background-color: #f9f9f9; line-height: 16px; border-bottom: 1px solid #efefef; border-left: 1px solid #999;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #FF8000;">Optional</span> <span style="color: #FF8000;">ByVal</span> StartPosition <span style="color: #FF8000;">As</span> <span style="color: #FF0000;">Long</span> = <span style="color: #FF0000;">1</span><span style="color: #000000;">)</span> <span style="color: #FF8000;">As</span> <span style="color: #FF8000;">String</span></li><li style="padding: 0 5px; background-color: #fff; line-height: 16px; border-bottom: 1px solid #efefef; border-left: 1px solid #999;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0600FF;">Dim</span> lnTextStart <span style="color: #FF8000;">As</span> <span style="color: #FF0000;">Long</span></li><li style="padding: 0 5px; background-color: #f9f9f9; line-height: 16px; border-bottom: 1px solid #efefef; border-left: 1px solid #999;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0600FF;">Dim</span> lnTextEnd <span style="color: #FF8000;">As</span> <span style="color: #FF0000;">Long</span></li><li style="padding: 0 5px; background-color: #fff; line-height: 16px; border-bottom: 1px solid #efefef; border-left: 1px solid #999;">&nbsp;</li><li style="padding: 0 5px; background-color: #f9f9f9; line-height: 16px; border-bottom: 1px solid #efefef; border-left: 1px solid #999;">&nbsp; &nbsp; &nbsp; &nbsp; lnTextStart = <span style="color: #0600FF;">InStr</span><span style="color: #000000;">(</span>StartPosition, InputText, StartText, vbTextCompare<span style="color: #000000;">)</span> + <span style="color: #FF8000;">Len</span><span style="color: #000000;">(</span>StartText<span style="color: #000000;">)</span></li><li style="padding: 0 5px; background-color: #fff; line-height: 16px; border-bottom: 1px solid #efefef; border-left: 1px solid #999;">&nbsp; &nbsp; &nbsp; &nbsp; lnTextEnd = <span style="color: #0600FF;">InStr</span><span style="color: #000000;">(</span>lnTextStart, InputText, EndText, vbTextCompare<span style="color: #000000;">)</span></li><li style="padding: 0 5px; background-color: #f9f9f9; line-height: 16px; border-bottom: 1px solid #efefef; border-left: 1px solid #999;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0600FF;">If</span> lnTextStart >= <span style="color: #000000;">(</span>StartPosition + <span style="color: #FF8000;">Len</span><span style="color: #000000;">(</span>StartText<span style="color: #000000;">)</span><span style="color: #000000;">)</span> <span style="color: #804040;">And</span> lnTextEnd > lnTextStart <span style="color: #FF8000;">Then</span></li><li style="padding: 0 5px; background-color: #fff; line-height: 16px; border-bottom: 1px solid #efefef; border-left: 1px solid #999;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; GetString = <span style="color: #FF8000;">Mid</span><span style="color: #000000;">(</span>InputText, lnTextStart, lnTextEnd - lnTextStart<span style="color: #000000;">)</span></li><li style="padding: 0 5px; background-color: #f9f9f9; line-height: 16px; border-bottom: 1px solid #efefef; border-left: 1px solid #999;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #FF8000;">Else</span></li><li style="padding: 0 5px; background-color: #fff; line-height: 16px; border-bottom: 1px solid #efefef; border-left: 1px solid #999;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; GetString = <span style="color: #808080;">""</span></li><li style="padding: 0 5px; background-color: #f9f9f9; line-height: 16px; border-bottom: 1px solid #efefef; border-left: 1px solid #999;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0600FF;">End</span> <span style="color: #0600FF;">If</span></li><li style="padding: 0 5px; background-color: #fff; line-height: 16px; border-bottom: 1px solid #efefef; border-left: 1px solid #999;">&nbsp; &nbsp; <span style="color: #0600FF;">End</span> <span style="color: #0600FF;">Function</span></li><li style="padding: 0 5px; background-color: #f9f9f9; line-height: 16px; border-bottom: 1px solid #efefef; border-left: 1px solid #999;">&nbsp; &nbsp; <span style="color: #FF8000;">Private</span> <span style="color: #0600FF;">Sub</span> EnableUI<span style="color: #000000;">(</span><span style="color: #FF8000;">ByVal</span> Value <span style="color: #FF8000;">As</span> <span style="color: #FF0000;">Boolean</span><span style="color: #000000;">)</span></li><li style="padding: 0 5px; background-color: #fff; line-height: 16px; border-bottom: 1px solid #efefef; border-left: 1px solid #999;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0600FF;">If</span> <span style="color: #FF8000;">Me</span>.<span style="color: #0000FF;">InvokeRequired</span> <span style="color: #FF8000;">Then</span></li><li style="padding: 0 5px; background-color: #f9f9f9; line-height: 16px; border-bottom: 1px solid #efefef; border-left: 1px solid #999;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #008080; font-style: italic;">' InvokeRequired indicates that the call came from another thread, so </span></li><li style="padding: 0 5px; background-color: #fff; line-height: 16px; border-bottom: 1px solid #efefef; border-left: 1px solid #999;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #008080; font-style: italic;">' it must be invoked back to the UI thread...</span></li><li style="padding: 0 5px; background-color: #f9f9f9; line-height: 16px; border-bottom: 1px solid #efefef; border-left: 1px solid #999;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0600FF;">Dim</span> args <span style="color: #FF8000;">As</span> <span style="color: #FF0000;">Object</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span> = <span style="color: #000000;">{</span>Value<span style="color: #000000;">}</span></li><li style="padding: 0 5px; background-color: #fff; line-height: 16px; border-bottom: 1px solid #efefef; border-left: 1px solid #999;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #FF8000;">Me</span>.<span style="color: #0000FF;">Invoke</span><span style="color: #000000;">(</span><span style="color: #FF8000;">New</span> EnableUIDelegate<span style="color: #000000;">(</span><span style="color: #804040;">AddressOf</span> EnableUI<span style="color: #000000;">)</span>, args<span style="color: #000000;">)</span></li><li style="padding: 0 5px; background-color: #f9f9f9; line-height: 16px; border-bottom: 1px solid #efefef; border-left: 1px solid #999;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #FF8000;">Else</span></li><li style="padding: 0 5px; background-color: #fff; line-height: 16px; border-bottom: 1px solid #efefef; border-left: 1px solid #999;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #008080; font-style: italic;">' this is the purpose of the routine...</span></li><li style="padding: 0 5px; background-color: #f9f9f9; line-height: 16px; border-bottom: 1px solid #efefef; border-left: 1px solid #999;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #FF8000;">Me</span>.<span style="color: #0000FF;">btnLogin</span>.<span style="color: #0000FF;">Enabled</span> = Value</li><li style="padding: 0 5px; background-color: #fff; line-height: 16px; border-bottom: 1px solid #efefef; border-left: 1px solid #999;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #FF8000;">Me</span>.<span style="color: #0000FF;">btnStart</span>.<span style="color: #0000FF;">Enabled</span> = Value</li><li style="padding: 0 5px; background-color: #f9f9f9; line-height: 16px; border-bottom: 1px solid #efefef; border-left: 1px solid #999;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0600FF;">End</span> <span style="color: #0600FF;">If</span></li><li style="padding: 0 5px; background-color: #fff; line-height: 16px; border-bottom: 1px solid #efefef; border-left: 1px solid #999;">&nbsp; &nbsp; <span style="color: #0600FF;">End</span> <span style="color: #0600FF;">Sub</span></li><li style="padding: 0 5px; background-color: #f9f9f9; line-height: 16px; border-bottom: 1px solid #efefef; border-left: 1px solid #999;">&nbsp; &nbsp; <span style="color: #FF8000;">Private</span> <span style="color: #0600FF;">Sub</span> SetText<span style="color: #000000;">(</span><span style="color: #FF8000;">ByVal</span> MyControl <span style="color: #FF8000;">As</span> System.<span style="color: #0000FF;">Windows</span>.<span style="color: #0000FF;">Forms</span>.<span style="color: #0000FF;">Control</span>, <span style="color: #FF8000;">ByVal</span> Message <span style="color: #FF8000;">As</span> <span style="color: #FF8000;">String</span><span style="color: #000000;">)</span></li><li style="padding: 0 5px; background-color: #fff; line-height: 16px; border-bottom: 1px solid #efefef; border-left: 1px solid #999;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0600FF;">If</span> <span style="color: #FF8000;">Me</span>.<span style="color: #0000FF;">InvokeRequired</span> <span style="color: #FF8000;">Then</span></li><li style="padding: 0 5px; background-color: #f9f9f9; line-height: 16px; border-bottom: 1px solid #efefef; border-left: 1px solid #999;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0600FF;">Dim</span> args <span style="color: #FF8000;">As</span> <span style="color: #FF0000;">Object</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span> = <span style="color: #000000;">{</span>MyControl, Message<span style="color: #000000;">}</span></li><li style="padding: 0 5px; background-color: #fff; line-height: 16px; border-bottom: 1px solid #efefef; border-left: 1px solid #999;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #FF8000;">Me</span>.<span style="color: #0000FF;">Invoke</span><span style="color: #000000;">(</span><span style="color: #FF8000;">New</span> SetTextDelegate<span style="color: #000000;">(</span><span style="color: #804040;">AddressOf</span> SetText<span style="color: #000000;">)</span>, args<span style="color: #000000;">)</span></li><li style="padding: 0 5px; background-color: #f9f9f9; line-height: 16px; border-bottom: 1px solid #efefef; border-left: 1px solid #999;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #FF8000;">Else</span></li><li style="padding: 0 5px; background-color: #fff; line-height: 16px; border-bottom: 1px solid #efefef; border-left: 1px solid #999;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; MyControl.<span style="color: #0000FF;">Text</span> = Message</li><li style="padding: 0 5px; background-color: #f9f9f9; line-height: 16px; border-bottom: 1px solid #efefef; border-left: 1px solid #999;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0600FF;">End</span> <span style="color: #0600FF;">If</span></li><li style="padding: 0 5px; background-color: #fff; line-height: 16px; border-bottom: 1px solid #efefef; border-left: 1px solid #999;">&nbsp; &nbsp; <span style="color: #0600FF;">End</span> <span style="color: #0600FF;">Sub</span></li><li style="padding: 0 5px; background-color: #f9f9f9; line-height: 16px; border-bottom: 1px solid #efefef; border-left: 1px solid #999;">&nbsp; &nbsp; <span style="color: #FF8000;">Private</span> <span style="color: #0600FF;">Sub</span> SetText<span style="color: #000000;">(</span><span style="color: #FF8000;">ByVal</span> MyControl <span style="color: #FF8000;">As</span> System.<span style="color: #0000FF;">Windows</span>.<span style="color: #0000FF;">Forms</span>.<span style="color: #0000FF;">ToolStripStatusLabel</span>, <span style="color: #FF8000;">ByVal</span> Message <span style="color: #FF8000;">As</span> <span style="color: #FF8000;">String</span><span style="color: #000000;">)</span></li><li style="padding: 0 5px; background-color: #fff; line-height: 16px; border-bottom: 1px solid #efefef; border-left: 1px solid #999;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0600FF;">If</span> <span style="color: #FF8000;">Me</span>.<span style="color: #0000FF;">InvokeRequired</span> <span style="color: #FF8000;">Then</span></li><li style="padding: 0 5px; background-color: #f9f9f9; line-height: 16px; border-bottom: 1px solid #efefef; border-left: 1px solid #999;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0600FF;">Dim</span> args <span style="color: #FF8000;">As</span> <span style="color: #FF0000;">Object</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span> = <span style="color: #000000;">{</span>MyControl, Message<span style="color: #000000;">}</span></li><li style="padding: 0 5px; background-color: #fff; line-height: 16px; border-bottom: 1px solid #efefef; border-left: 1px solid #999;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #FF8000;">Me</span>.<span style="color: #0000FF;">Invoke</span><span style="color: #000000;">(</span><span style="color: #FF8000;">New</span> SetToolTextDelegate<span style="color: #000000;">(</span><span style="color: #804040;">AddressOf</span> SetText<span style="color: #000000;">)</span>, args<span style="color: #000000;">)</span></li><li style="padding: 0 5px; background-color: #f9f9f9; line-height: 16px; border-bottom: 1px solid #efefef; border-left: 1px solid #999;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #FF8000;">Else</span></li><li style="padding: 0 5px; background-color: #fff; line-height: 16px; border-bottom: 1px solid #efefef; border-left: 1px solid #999;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; MyControl.<span style="color: #0000FF;">Text</span> = Message</li><li style="padding: 0 5px; background-color: #f9f9f9; line-height: 16px; border-bottom: 1px solid #efefef; border-left: 1px solid #999;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0600FF;">End</span> <span style="color: #0600FF;">If</span></li><li style="padding: 0 5px; background-color: #fff; line-height: 16px; border-bottom: 1px solid #efefef; border-left: 1px solid #999;">&nbsp; &nbsp; <span style="color: #0600FF;">End</span> <span style="color: #0600FF;">Sub</span></li><li style="padding: 0 5px; background-color: #f9f9f9; line-height: 16px; border-bottom: 1px solid #efefef; border-left: 1px solid #999;">&nbsp;</li><li style="padding: 0 5px; background-color: #fff; line-height: 16px; border-bottom: 1px solid #efefef; border-left: 1px solid #999;"><span style="color: #0600FF;">End</span> <span style="color: #0600FF;">Class</span></li><li style="padding: 0 5px; background-color: #f9f9f9; line-height: 16px; border-bottom: 1px solid #efefef; border-left: 1px solid #999;">&nbsp;</li><li style="padding: 0 5px; background-color: #fff; line-height: 16px; border-bottom: 1px solid #efefef; border-left: 1px solid #999;">&nbsp;</li></ol></div>
     
  2. ZOMG

    ZOMG Level I

    Joined:
    Feb 26, 2007
    Messages:
    122
    Likes Received:
    0
    Location:
    Hipocresy Land
    GREAT!!
    Thx.
    New codes to learn =D
     
  3. pandahorde

    pandahorde Level IV

    Joined:
    Dec 17, 2006
    Messages:
    2,249
    Likes Received:
    17
    Location:
    "MANILA ZOO"
    yeah lots of codes.
    keep it up
     
  4. expon

    expon Administrator
    Staff Member

    Joined:
    Oct 30, 2006
    Messages:
    1,393
    Likes Received:
    56
    Location:
    UK
    if you have any questions feel free to ask!
     
  5. omgcat

    omgcat Level IV

    Joined:
    Jan 31, 2007
    Messages:
    1,137
    Likes Received:
    0
    What moduels are you using to do this? Sleep, Stuff, and an HTTP wrapper, anything else?
     
  6. Smelly

    Smelly Level IV

    Joined:
    Dec 1, 2006
    Messages:
    2,197
    Likes Received:
    8
    Location:
    England
    oh and does it have auto log in?

    and if not, where can we add it?
     
  7. Dr. Leet

    Dr. Leet Level I

    Joined:
    Apr 8, 2007
    Messages:
    43
    Likes Received:
    0
    Location:
    #32 Spooner St.
    Umm... This is in Visual Basic. NET! Not VB6
     
  8. expon

    expon Administrator
    Staff Member

    Joined:
    Oct 30, 2006
    Messages:
    1,393
    Likes Received:
    56
    Location:
    UK
    I have never been logged out while running one of my programs in .NET although I'm sure it could happen.
     
  9. SoC

    SoC Moderator
    Staff Member

    Joined:
    Jan 24, 2007
    Messages:
    4,551
    Likes Received:
    105
    Location:
    Maaaaaaanchester!
    ((im hopeless at coding))

    but while you were away TNT installed a cookie that randomly expires after 30minutes or somesorts. ask expon he knows best :S
     
  10. expon

    expon Administrator
    Staff Member

    Joined:
    Oct 30, 2006
    Messages:
    1,393
    Likes Received:
    56
    Location:
    UK
    yeah I'm aware of their code but none-the-less it doesn't seem to effect the .net programs I have written for some reason.
     
  11. marlene

    marlene Moderator
    Staff Member

    Joined:
    Dec 23, 2006
    Messages:
    1,492
    Likes Received:
    12
    Location:
    Somewhere under the Rainbow (Montreal)
    Try this... load up your aber and log in... and then open up a browser, logging into the same account.

    Within minutes your aber will be log'd out.... but there's no warning... you'll just be refreshing a login screen.
     
  12. the_skip

    the_skip Level IV

    Joined:
    Dec 25, 2006
    Messages:
    2,354
    Likes Received:
    1
    Location:
    Indiana
    it could happen because it makes its own cookies in a seperate place apart from the main cookies you have through borwsing
     
  13. expon

    expon Administrator
    Staff Member

    Joined:
    Oct 30, 2006
    Messages:
    1,393
    Likes Received:
    56
    Location:
    UK
    i feel no effects. however my browser does log out from time to time when i'm running a program.