T
T
TechNOIR2018-05-22 15:51:47
C++ / C#
TechNOIR, 2018-05-22 15:51:47

C#. How to handle event only 1 time?

Good afternoon.
Please tell me how to handle the event only 1 time?

webBrowser1.Document.Click += webBrowser1_Browser_Mouse_Moved;
    private void webBrowser1_Browser_Mouse_Moved(object sender, HtmlElementEventArgs e)
        {
      string element = webBrowser1.Document.GetElementFromPoint(e.ClientMousePosition).GetAttribute("href");
      Debug.WriteLine(element);
        }

It is processed once because when you click on the element, another modal window pops up, etc. And throws element several times.
Is there a way to handle the event once? Thank you!

Answer the question

In order to leave comments, you need to log in

1 answer(s)
F
FreeBa, 2018-05-22
@FreeBa

Unsubscribe from him.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question