Since it worked on all of my computers and only my computers i decided to format and reinstall windows on my work PC because it seemed that my computers all had something that most didn't
so, with doing that and running the app it appears that for some reason the axWebBrowser1_DocumentComplete event isn't firing.
I have sent it to multiple URLs and it never fires that event
any ideas?
// Add an event handler for the "doc complete" event
SHDocVw::DWebBrowserEvents2_DocumentCompleteEventHandler^ DDocComplete = ( gcnew SHDocVw::DWebBrowserEvents2_DocumentCompleteEventHandler(this, &myApp::Form1::DocumentComplete) );
m_ie->DocumentComplete += DDocComplete;
That's what I use. these examples I'm giving you are in managed C++ of course but they should be easy enough to port. This is a definition of a "delegate" function/method which are used quite extensively in dotnet. Search for "documentcomplete event delegate" on G.
Here's what the DocumentComplete method looks like;
private: System::Void DocumentComplete( System::Object^ pDisp, ref class System::Object^% URL )
{
m_bIsDocComplete = true;
switch( m_pageReference )
{
case 10:
this->m_pageReference = 20;
this->CheckOut();
break;
case 20:
this->m_pageReference = 30;
this->ValidateCheckout();
break;
case 30:
this->m_pageReference = 40;
this->SelectAddress();
break;
case 40:
this->m_pageReference = 50;
this->SelectContinue();
case 50:
this->m_pageReference = 60;
this->PlaceOrder();
default:
break;
}
}
It performs a different task depending on the value of m_pageReference, this is because I load multiple pages in this particular app.
HTH,
td