Game Career Guide Forums

Game Career Guide Forums (http://www.gamecareerguide.com/forums/index.php)
-   Programming (http://www.gamecareerguide.com/forums/forumdisplay.php?f=7)
-   -   Why doesn't this call back function get called? (http://www.gamecareerguide.com/forums/showthread.php?t=6084)

complete 10-30-2012 06:04 AM

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?

Protector one 10-30-2012 09:23 AM

Re: Why doesn't this call back function get called?
 
Uhm, this is XNA…? What are you doing?

complete 11-04-2012 03:05 AM

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".

Protector one 11-04-2012 07:35 AM

Re: Why doesn't this call back function get called?
 
Hmm… have you tried registering to the DocumentCompleted event instead of LoadCompleted?


All times are GMT -8. The time now is 08:04 AM.

Powered by vBulletin® Version 3.6.9
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.