Tag: Windows Forms
-
Howto: Ignoring web browser certificate errors in a webbrowser host
The webbrowser queries host services via IServiceProvider implemented on the ActiveX host. One of the services is IHttpSecurity, which can be used to override the certificate problem dialog. Security warning: ignoring security problems can compromise your application. IHttpSecurity is derived from IWindowForBindingUI, so the host needs to implement it too. In Windows forms, customizing certificate error handling…
-
Make the webbrowser control styled the same way as the hosting application
User wtx_sonery wants to know whether it is possible to style the webbrowser control with the rest of the application. The answer is yes, you can implement IDocHostUIHandler’s GetHostInfo method and return DOCHOSTUIFLAG_THEME in the host flags. IDocHostUIHandler is already implemented in MFC and ATL. For MFC there are CHtmlControlSite and CBrowserControlSite but you should…
-
AutoComplete with DataSource
Download the code for this article (22KB) .Net 2.0 introduced autocompletion in TextBox and ComboBox. It is obvious that autocomplete is not very useful when the number of options is small. However, when the number of option becomes too many, pre-filling of all options to an AutoCompleteStringCollection becomes impractical, especially when the data is coming from a…