0

I'm using gecko webbrowser control in my winforms app, it's belonging to firefox browser.

When I navigate to www.facebook.com I get this messagebox immediately :

Security Warning that I get

it's really annoying , I tried to press enter by code when my webbrowser loses focus but it doesn't work.. how to get rid of it ?

Karam Najjar
  • 527
  • 5
  • 21

1 Answers1

0
Application.OpenForms[1].Close();
Karam Najjar
  • 527
  • 5
  • 21
  • Could you elaborate on this? Is `OpenForms[1]` always the correct choice? – Stephan Sep 01 '14 at 09:58
  • At first I thought that message box is not a form ,but when I checked Application.OpenForms.count it was 2 , so I closed it as above. I was searching for an answer , I don't know when it is correct and when it is not,I discovered this accidentally :D – Karam Najjar Sep 02 '14 at 08:41