Click here to Skip to main content
15,899,026 members
Home / Discussions / C#
   

C#

 
AnswerRe: Killing the Processes Using process.Kill() restarts the system Pin
User 665813-Jun-08 2:39
User 665813-Jun-08 2:39 
GeneralRe: Killing the Processes Using process.Kill() restarts the system Pin
Neeraj Kr13-Jun-08 2:47
Neeraj Kr13-Jun-08 2:47 
GeneralRe: Killing the Processes Using process.Kill() restarts the system Pin
Dan Neely13-Jun-08 3:03
Dan Neely13-Jun-08 3:03 
GeneralRe: Killing the Processes Using process.Kill() restarts the system Pin
Neeraj Kr13-Jun-08 3:50
Neeraj Kr13-Jun-08 3:50 
GeneralRe: Killing the Processes Using process.Kill() restarts the system Pin
Ashfield13-Jun-08 3:02
Ashfield13-Jun-08 3:02 
GeneralRe: Killing the Processes Using process.Kill() restarts the system Pin
Neeraj Kr13-Jun-08 3:35
Neeraj Kr13-Jun-08 3:35 
GeneralRe: Killing the Processes Using process.Kill() restarts the system Pin
leppie13-Jun-08 3:50
leppie13-Jun-08 3:50 
QuestionEvent gets interrupted Pin
Member 447129213-Jun-08 1:25
Member 447129213-Jun-08 1:25 
Hi everyone,

I have a problem with executing some code in an Event.
In detail I use a WebBrowser control and its onDocumentCompleted Event.
When the Document is completely loaded I want to do some work (adding some event listeners to the document's mouse events).

But now, on pages containing frames, my event gets interrupted by the other frames firing the same event (I use the same method for every DocumentCompleted Event).

Does anyone know why my event gets interrupted and how I could manage to finish the event method and afterwards proceed it for the next event in queue?

Here is my code (the class ExtendedWebBrowser is inherited from the standard class WebBrowser):

private void webBrowser1_DocumentCompleted(object sender, WebBrowserDocumentCompletedEventArgs e)
        {
                MessageBox.Show("1");

                ExtendedWebBrowser brws = ((ExtendedWebBrowser)sender);
                brws.zoom = 3;

                if (brws.Document.Window.Frames.Count > 0)
                    {
                        for (int i = 0; i < brws.Document.Window.Frames.Count; i++)
                        {
                            brws.Document.Window.Frames[i].Document.MouseMove += new HtmlElementEventHandler(tabControl_MouseMove);
                            brws.Document.Window.Frames[i].Document.MouseUp += new HtmlElementEventHandler(tabControl_MouseUp);
                            brws.Document.Window.Frames[i].Document.MouseDown += new HtmlElementEventHandler(tabControl_MouseDown);
                        }
                    }

                    brws.Document.MouseMove += new HtmlElementEventHandler(tabControl_MouseMove);
                    brws.Document.MouseUp += new HtmlElementEventHandler(tabControl_MouseUp);
                    brws.Document.MouseDown += new HtmlElementEventHandler(tabControl_MouseDown);

                

                MessageBox.Show("2");
                
                //do some other work...

                
                MessageBox.Show("3");
                

            }


It would be fine if anybody could help me to solve the problem or give me a hint on how to search on (maybe I used the wrong words in google?!).

Maybe I have to say that I am more a novice in programming but willing to learn more Smile | :)

Thanks for your help.
Andreas
AnswerRe: Event gets interrupted Pin
Guffa13-Jun-08 1:51
Guffa13-Jun-08 1:51 
GeneralRe: Event gets interrupted Pin
Member 447129213-Jun-08 3:10
Member 447129213-Jun-08 3:10 
QuestionHow to handle the event of killing a process from task manager??? Pin
Bins Davis13-Jun-08 1:24
Bins Davis13-Jun-08 1:24 
AnswerRe: How to handle the event of killing a process from task manager??? Pin
Simon P Stevens13-Jun-08 3:15
Simon P Stevens13-Jun-08 3:15 
GeneralRe: How to handle the event of killing a process from task manager??? Pin
Bins Davis15-Jun-08 20:54
Bins Davis15-Jun-08 20:54 
QuestionMDI Parent won't allow Child maximise Pin
Yosh_13-Jun-08 1:14
professionalYosh_13-Jun-08 1:14 
AnswerRe: MDI Parent won't allow Child maximise Pin
DaveyM6913-Jun-08 3:45
professionalDaveyM6913-Jun-08 3:45 
QuestionProblem removing edges Pin
Gareth H13-Jun-08 0:13
Gareth H13-Jun-08 0:13 
AnswerRe: Problem removing edges Pin
Ashfield13-Jun-08 0:22
Ashfield13-Jun-08 0:22 
GeneralRe: Problem removing edges Pin
Gareth H13-Jun-08 0:28
Gareth H13-Jun-08 0:28 
GeneralRe: Problem removing edges Pin
Ashfield13-Jun-08 2:01
Ashfield13-Jun-08 2:01 
AnswerRe: Problem removing edges Pin
Simon P Stevens13-Jun-08 0:26
Simon P Stevens13-Jun-08 0:26 
GeneralRe: Problem removing edges Pin
Gareth H13-Jun-08 0:29
Gareth H13-Jun-08 0:29 
GeneralRe: Problem removing edges Pin
Simon P Stevens13-Jun-08 0:56
Simon P Stevens13-Jun-08 0:56 
Questionreading a xml document from a listview Pin
laziale12-Jun-08 23:22
laziale12-Jun-08 23:22 
AnswerRe: reading a xml document from a listview [modified] Pin
leppie12-Jun-08 23:30
leppie12-Jun-08 23:30 
AnswerRe: reading a xml document from a listview Pin
Eslam Afifi12-Jun-08 23:34
Eslam Afifi12-Jun-08 23:34 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.