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): <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;"> </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;"> <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;"> <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;"> <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;"> <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;"> <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;"> <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;"> <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;"> <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;"> <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;"> <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;"> <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;"> <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;"> 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;"> <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;"> <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;"> <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;"> <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;"> <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;"> <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;"> <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;"> <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;"> <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;"> <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;"> <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;"> <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;"> 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;"> 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;"> 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;"> <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;"> 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;"> <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;"> 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;"> <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;"> 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;"> <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;"> <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;"> 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;"> 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;"> 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;"> <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;"> 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;"> 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;"> 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;"> </li><li style="padding: 0 5px; background-color: #fff; line-height: 16px; border-bottom: 1px solid #efefef; border-left: 1px solid #999;"> 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;"> <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;"> <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;"> <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;"> <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;"> <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;"> <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;"> <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;"> <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;"> <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;"> <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;"> <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;"> <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;"> <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;"> </li><li style="padding: 0 5px; background-color: #f9f9f9; line-height: 16px; border-bottom: 1px solid #efefef; border-left: 1px solid #999;"> 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;"> 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;"> 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;"> <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;"> 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;"> 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;"> <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;"> <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;"> <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;"> 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;"> 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;"> 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;"> <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;"> Return Count</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;">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;"> <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;"> 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;"> <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;"> <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;"> <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;"> <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;"> <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;"> <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;"> <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;"> <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;"> <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;"> <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;"> <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;"> <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;"> <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;"> <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;"> 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;"> <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;"> 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;"> <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;"> <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;"> 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;"> 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;"> 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;"> <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;"> <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;"> <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;"> 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;"> 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;"> 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;"> 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;"> 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;"> 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;"> <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;"> <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;"> 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;"> 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;"> 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;"> <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;"> 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;"> <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;"> 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;"> 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;"> 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;"> 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;"> <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;"> 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;"> <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;"> <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;"> 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;"> <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;"> <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;"> 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;"> <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;"> <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;"> <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;"> 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;"> <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;"> 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;"> <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;"> 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;"> <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;"> <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;"> 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;"> <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;"> <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;"> <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;"> <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;"> <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;"> <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;"> <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;"> <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;"> </li><li style="padding: 0 5px; background-color: #f9f9f9; line-height: 16px; border-bottom: 1px solid #efefef; border-left: 1px solid #999;"> 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;"> 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;"> <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;"> 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;"> <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;"> 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;"> <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;"> <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;"> <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;"> <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;"> <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;"> <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;"> <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;"> <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;"> <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;"> <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;"> <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;"> <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;"> <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;"> <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;"> <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;"> <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;"> <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;"> <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;"> <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;"> 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;"> <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;"> <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;"> <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;"> <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;"> <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;"> <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;"> <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;"> 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;"> <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;"> <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;"> </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;"> </li><li style="padding: 0 5px; background-color: #fff; line-height: 16px; border-bottom: 1px solid #efefef; border-left: 1px solid #999;"> </li></ol></div>
I have never been logged out while running one of my programs in .NET although I'm sure it could happen.
((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
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.
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.
it could happen because it makes its own cookies in a seperate place apart from the main cookies you have through borwsing