i have some webbrowser problem in vb8
-
13 เมษายน 2555 14:32
hello
if i webbrowser1.navigate "http://google.com" when this page was loaded then automatically navigate to facebook.com
i try webbrowser document completed event but still not working anybody tell me Thanks
ตอบทั้งหมด
-
16 เมษายน 2555 6:00ผู้ดูแล
Hi Spiderman14444,
Welcome to the MSDN forum.
Would you please provide us codes in DocumentCompleted event? I used the follow codes and it worked:
'if the current url is not facebook then redirecet to If Me.WebBrowser1.Url.ToString <> "http://www.facebook.com/" Then WebBrowser1.Navigate("www.facebook.com") Console.WriteLine(Me.WebBrowser1.Url.ToString) End If
Thank in advance!
Best regards,
Shanks Zen
MSDN Community Support | Feedback to us
- เสนอเป็นคำตอบโดย Jordan St. Godard 16 เมษายน 2555 15:57
- ทำเครื่องหมายเป็นคำตอบโดย Shanks ZenMicrosoft, Moderator 17 เมษายน 2555 5:35
-
16 เมษายน 2555 15:48Thank you
-
16 เมษายน 2555 15:59
Spiderman,
I see you all the time writing VB8, are you sure that it is the VB from VB2005?
The one from VB2008 is VB9 and coincidentally is the one from VB2010 VB10.
However, as answer, in the Document Complete event you have to check if the IsReady = true
A webpage mostly contains more documents and if the last one is loaded the status IsReady = true
Success
Cor- แก้ไขโดย Cor LigthertMVP 16 เมษายน 2555 16:01
- ทำเครื่องหมายเป็นคำตอบโดย Shanks ZenMicrosoft, Moderator 17 เมษายน 2555 5:35
-
16 เมษายน 2555 16:56
'if the current url is not facebook then redirecet to If Me.WebBrowser1.Url.ToString <> "http://www.facebook.com/" Then WebBrowser1.Navigate("www.facebook.com") Console.WriteLine(Me.WebBrowser1.Url.ToString) End If
this code is working thanks