|
-
Oct 27th, 2005, 04:19 PM
#1
Thread Starter
Junior Member
When page is done loading
VB Code:
Public ie As InternetExplorer
Public ie1
OTHER CODE
Private Sub Form_Load()
Set ie1 = CreateObject("InternetExplorer.Application")
ie1.Navigate2 "http://www.kingsofchaos.com/login.php?"
ie1.Visible = True
End Sub
Whats the event for when ie1 is done loading?
Im fairly sure its simple, Ive just searched about 30-40 threads by now, and I dont know if Ill find it. Sorry for posting a new thread if I skipped over it accidentally
Ive tried
VB Code:
Private Sub ie1_NavigateComplete2()
Private Sub ie1_Navigate2Complete()
Private Sub ie1_NavigateComplete()
Private Sub ie1_Load()
And some others
Thanks for all your help, you guys are fast and smart =P
Bear
-
Oct 27th, 2005, 04:57 PM
#2
Re: When page is done loading
If you used a WebBrowser Control, you could use the WebBrowser1_DocumentComplete() Sub.
-
Oct 27th, 2005, 04:59 PM
#3
Thread Starter
Junior Member
Re: When page is done loading
Web Browser control has to be inside the dialog form though, correct?
Bear
-
Oct 27th, 2005, 05:02 PM
#4
Re: When page is done loading
Yep.
I have been searching ALLAPI.net for an API solution (no luck so far)
Obviously, you need a method of determining when the page is finished loading from a shelled instance of IE.
-
Oct 27th, 2005, 05:06 PM
#5
Re: When page is done loading
-
Oct 27th, 2005, 05:08 PM
#6
Re: When page is done loading
This worked for me:
VB Code:
Option Explicit
Public ie As Object < Note: Your reference is different ********************
Public ie1
Private Sub Form_Load()
Set ie1 = CreateObject("InternetExplorer.Application")
ie1.Navigate2 "http://www.kingsofchaos.com/login.php?"
ie1.Visible = True
Do While ie1.Busy = True
DoEvents
Loop
MsgBox "Done"
End Sub
-
Oct 27th, 2005, 09:07 PM
#7
Thread Starter
Junior Member
Re: When page is done loading
I need it to react every time the page is reloaded, so I can parse the information
Is that possible?
Bear
-
Oct 27th, 2005, 09:41 PM
#8
Re: When page is done loading
 Originally Posted by bearruler
I need it to react every time the page is reloaded, so I can parse the information
Is that possible?
Bear
This is now of course a new requirement to your original post, correct?
-
Oct 28th, 2005, 05:09 PM
#9
Thread Starter
Junior Member
Re: When page is done loading
No, forgot to mention it in my first post, I actually didnt think of just reacting on the first load
But yes, it was not in my first post (though It should have been) i'll have to say correct
Bear
Last edited by bearruler; Nov 24th, 2005 at 04:05 PM.
-
Oct 29th, 2005, 01:39 AM
#10
Fanatic Member
Re: When page is done loading
It would be a lot easier if you used the WebBrowser control, then you could use
VB Code:
Private Sub WebBrowser1_DocumentComplete(ByVal pDisp As Object, URL As Variant)
'Parse out text here...
End Sub
-
Oct 31st, 2005, 08:08 AM
#11
Re: When page is done loading
You do realise if you just use "Public ie1", it types as Variant, when you really want it to be typed as an "Object" so you would need "Public ie1 As Object"
-
Oct 31st, 2005, 08:38 AM
#12
Re: When page is done loading
ok.. start over 
Add a Reference (Not the control.. just a ref) to MS Internet Control
Now:
VB Code:
Dim WithEvents IE1 as InternetExplorer
Private Sub Form_Load()
Set IE1 = New InternetExplorer
ie1.Navigate2 "http://www.kingsofchaos.com/login.php?"
ie1.Visible = True
End Sub
now.. in the object dropdown.. (Left dropdown in the codewindow...)
Pick IE1...
now look at your event dropdown.. (The right combo.. )
U have ALL the events that can be used just like the Webbrowser Control. 
Use Document Complete event...
VB Code:
Private Sub IE1_DocumentComplete(ByVal pDisp As Object, URL As Variant)
If (pDisp Is IE1.Application) Then 'This checks to make sure the doc is FULLY loaded
If URL = "http://www.whatever.com" Then
'Do some code
End If
End If
End Sub
JPnyc rocks!! (Just ask him!)
If u have your answer please go to the thread tools and click "Mark Thread Resolved"
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|