VB6.0å¯éè¿WebBrowseræ§ä»¶çDocumentCompleteäºä»¶æ¥è·åå½åæå¼é¡µé¢çURLï¼ç½åï¼ã
DocumentCompleteäºä»¶
æè¿°
å½è¢«å¯¼èªå°è¯¥æ件达å°READYSTATE_COMPLETEç¶ææ¶åçã
URL å±æ§
设置æè¿å Execute æ OpenURL æ¹æ³ä½¿ç¨ç
URLã
代ç å®ä¾ï¼æ°å»ºVBçEXEå·¥ç¨ï¼æ·»å ä¸ä¸ªWebBrowseræ§ä»¶å°çªä½ï¼æ¾ç½®ä¸ä¸ªTextBoxæ§ä»¶ã
Private Sub Form_Load()
On Error GoTo useErr
WebBrowser1.Navigate "http://zhidao.baidu.com/"
Exit Sub
useErr:
Print "ERR"
End Sub
Private Sub WebBrowser1_DocumentComplete(ByVal pDisp As Object, URL As Variant)
Text1.Text = URL
End Sub