I need to create a Winform instance in another project. How it's done? I'm currently trying to bind a default constructor. It seems that my custom constructor is not being called.
Also .. the entry point for this application will not be in the project that owns this form. The value below will not execute:
Application.EnableVisualStyles(); Application.SetCompatibleTextRenderingDefault(false); Application.Run(new HtmlTestForm());
I'm not quite sure what this code does. Will the form work?
private HtmlTestForm() { InitializeComponent(); OpenBrowser(new Uri(TestURL)); } public HtmlTestForm(Uri uri) :this() { TestURL = uri; }
// New form in another project.
HtmlTestForm form = new HtmlTestForm(new Uri("http://SomeUri.html"));
c # winforms
Nick
source share