c# - How to detect when an internet-browser is open in Windows Forms and do an action if an URL was fired? -
i want write programme recognizes when browser open , every time action, when user went website. example:
the programme running scheme tray , starting automatically on windows startup. (this works)
now programme runs function, if client open random internet-browser (ie, chrome, ...) have example-code messagebox.show("you opened browser!")
.
if user types illustration "www.google.com" in address bar , force [enter] programme should open example-function messagebox.show("you entered " + enteredurl)
before website loaded.
thanks in advance help!
take @ navigating
event:
occurs before webbrowser command navigates new document.
it possible connect existing instance of ie, you'll need work underlying com api (see here).
for other browsers there no general mechanism: you'll need work out if api exists browser browser.
c# winforms
No comments:
Post a Comment