elminsters
01-06-2005, 02:21 PM
Hi everyone, this is my first time posting but ive read lots of great tips/info on the forum... keep up the good work.
Ive had quite alot of experience with VB 6 and just recently moved over to .NET, ive got a reasonable amount of experience with OOP though.
The basics of the program that im trying to design... 1) sets the proxy information 2) Gotos a website, which redircts 3) checks weather the second website is even partially loaded 4) closes the link 5) goes onto the next proxy.
It redirects via a <META HTTP-EQUIV="refresh" content="0;URL=SOMELINK"> Tag.
Ive managed to get this working in Vb 6, using Internet explorer, Changing the proxy settings via registry, and closeing the webpage via mouse click (i know its the wrong way, but the Api to close the window didnt close it while its busy). :confused:
In VB .NET i made it do exactly that, (manually extracted the link from the redirecting page by cropping the Html code and modifying it) although it didnt register it correctly, even though i also changed the referer to the redirecting page.
I tried to do it with the following..
Public WithEvents Explorer As SHDocVw.InternetExplorer
'[Change registry settings here]
Explorer = New SHDocVw.InternetExplorer
Explorer.Visible = True
Explorer.Navigate(LinkToUse)
Private Sub Explorer_NavigateComplete2(ByVal pDisp As Object, ByRef URL As Object) Handles Explorer.NavigateComplete2
'[Check if the link is where i wanted it to go]
Explorer.quit()
'[Restart the process]
Although... the Quit kinda screws it because it doesnt allow it to reassign it to the new internet explorer. :(
Anyone know(in order of importance):
1) some basic code to do that would do loop i described? (Most important)
2) A better way to change the proxy settings?
3) Any other way or improving it?
Any comments are welcome, and thanks in advance for any useful information :D :D
Ive had quite alot of experience with VB 6 and just recently moved over to .NET, ive got a reasonable amount of experience with OOP though.
The basics of the program that im trying to design... 1) sets the proxy information 2) Gotos a website, which redircts 3) checks weather the second website is even partially loaded 4) closes the link 5) goes onto the next proxy.
It redirects via a <META HTTP-EQUIV="refresh" content="0;URL=SOMELINK"> Tag.
Ive managed to get this working in Vb 6, using Internet explorer, Changing the proxy settings via registry, and closeing the webpage via mouse click (i know its the wrong way, but the Api to close the window didnt close it while its busy). :confused:
In VB .NET i made it do exactly that, (manually extracted the link from the redirecting page by cropping the Html code and modifying it) although it didnt register it correctly, even though i also changed the referer to the redirecting page.
I tried to do it with the following..
Public WithEvents Explorer As SHDocVw.InternetExplorer
'[Change registry settings here]
Explorer = New SHDocVw.InternetExplorer
Explorer.Visible = True
Explorer.Navigate(LinkToUse)
Private Sub Explorer_NavigateComplete2(ByVal pDisp As Object, ByRef URL As Object) Handles Explorer.NavigateComplete2
'[Check if the link is where i wanted it to go]
Explorer.quit()
'[Restart the process]
Although... the Quit kinda screws it because it doesnt allow it to reassign it to the new internet explorer. :(
Anyone know(in order of importance):
1) some basic code to do that would do loop i described? (Most important)
2) A better way to change the proxy settings?
3) Any other way or improving it?
Any comments are welcome, and thanks in advance for any useful information :D :D