Search code examples
winformsvb6com-interopdotnetbrowser

Using dotnetbrowser in a WinForm via Com Interop?


We have an application where the main UI is coded in vb6. We also have multiple .net assemblies (winform and class libraries) built in vb.net (VS2015, targeting framework 4.5.2).

Can we utilize the winform dotnetbrowser in a .net assembly that is called via com interop from our vb6 main app?

The licensing articles instruct adding the license to the project as an embedded resourse - would this license be added to the .net assembly as an embedded resource? Or would it need to be added to the main app exe (vb6) as an embedded resource there?


Solution

  • Can we utilize the winform dotnetbrowser in a .net assembly that is called via com interop from our vb6 main app?

    Yes, this use-case is possible.

    The licensing articles instruct adding the license to the project as an embedded resourse - would this license be added to the .net assembly as an embedded resource? Or would it need to be added to the main app exe (vb6) as an embedded resource there?

    There are several ways to provide the licence to DotNetBrowser:

    • the most common and recommended way is to include the licence into the application .NET assembly as an Embedded Resource (it is usually done when performing a build)
    • the other common way is putting the licence file into the working directory of the application that loads and uses DotNetBrowser
    • at last, you can specify the full path to the licence file using the DOTNETBROWSER_LICENSE_PATH environment variable