Get the latest Education e-news
 

Go Back   Game Career Guide Forums > Programming
Forum Home Register Members List Mark Forums Read

Reply
 
Thread Tools Display Modes
Old 10-30-2012, 05:04 AM   #1
complete
Junior Member

Activity Longevity
0/20 6/20
Today Posts
0/11 ssssssss2
Default Why doesn't this call back function get called?

Why doesn't this call back function get called?

Basically here is the code surrounding the declaratoini callback method:

Code:
	webbrowser1 = new WebBrowser();

	webbrowser1.LoadCompleted +=webbrowser1_LoadCompleted;

	webbrowser1.Navigate(new Uri("http://www.google.com"));
Should there be something more or are they in the wrong order?
The method, webbrowser1_LoadCompleted, is never called. I have put breakpoints in the callback method and the running program never reaches this method:
Code:
         void webbrowser1_LoadCompleted(object sender, NavigationEventArgs e)
        {
            .
            .
            .

        }
I must be missing a reference. I do not know what one I am missing. Can you offer a suggestion?
complete is offline   Reply With Quote
Old 10-30-2012, 08:23 AM   #2
Protector one
Moderator

Activity Longevity
2/20 17/20
Today Posts
1/11 ssssss698
Location: Netherlands
Default Re: Why doesn't this call back function get called?

Uhm, this is XNA…? What are you doing?
__________________
My name is Louis. Hi!
Uh oh! The princess is in another signature!
Protector one is offline   Reply With Quote
Old 11-04-2012, 02:05 AM   #3
complete
Junior Member

Activity Longevity
0/20 6/20
Today Posts
0/11 ssssssss2
Default Re: Why doesn't this call back function get called?

No, it is C# on a WPF application.

I have issues with the C# WebBrowser class

I have a C# WPF application which uses a WebBrowser class. I have overwritten the LoadComplete method. The question I have is this. This method is supposed to be triggered when the class has completed a load, but , when I put a breakpoint on this method, it is called before the class visually has compleded a load. Because of this, the htmldata is not complete. Any ideas?

Maybe there is a different method I should overide. LoadComplete might not be the best choice. Maybe there is something that is the same as a "display complete".
complete is offline   Reply With Quote
Old 11-04-2012, 06:35 AM   #4
Protector one
Moderator

Activity Longevity
2/20 17/20
Today Posts
1/11 ssssss698
Location: Netherlands
Default Re: Why doesn't this call back function get called?

Hmm… have you tried registering to the DocumentCompleted event instead of LoadCompleted?
__________________
My name is Louis. Hi!
Uh oh! The princess is in another signature!
Protector one is offline   Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Powered by vBulletin® Version 3.6.9
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
All times are GMT -8. The time now is 09:57 AM.






UBM Tech