How to minimize form from a click on a webbrowser control
I've got a winform with a webbrowser control. The URL is a web page containing a java applet showing my web cam. What I'd like to do is minimize the form when I click anywhere in the region of the webbrowser control / webcam image. I tried messing around with transparent buttons but could not get anything to work. Since there is no OnClick event for the web browser control I'm not sure how to do this. I can modify the web cam 开发者_如何学Cpage, could this be done somehow through javascript in the page itself calling back to a method in the winform? [grasping at straws...]
This is a hack, but if it works, it's an idea...
In the web page containing the java applet,. can you include the applet inside a hyperlink pointing back to the same page? Then when the user clicks on the hyperlink, you can tap into the WebBrowser.Navigated event.
However, just picturing that from a user perspective, I hate the idea. If the WebBroser control is in a Windows Form, why would you not just include a minimize button on the form? The principle of not surprising the user comes to mind.
精彩评论