Evening all,
My question is can I have an System.Windows.Forms.Application.Run(MainForm) statement and execute it without having parsed MainForm visually appear. I have attempted to set properties such as Visible and methods like Hide() in the Form_Load event to no avail. It still shows the form.
//This is the class where i try and run my mainForm code
Trip_GenericWebBrowser
_newGenericBrowserForm = new Trip_GenericWebBrowser();_newGenericBrowserForm.Controls.Add(_newBrowser);
_newGenericBrowserForm.Visible =
false;_newGenericBrowserForm.Hide();
System.Windows.Forms.
Application.Run(_newGenericBrowserForm);//This is my form code
using
System;using
System.Collections.Generic;using
System.ComponentModel;using
System.Data;using
System.Drawing;using
System.Text;using
System.Windows.Forms;namespace
TripJobber{
public partial class Trip_GenericWebBrowser : Form{
public Trip_GenericWebBrowser(){
InitializeComponent();
}
private void Trip_GenericWebBrowser_Load(object sender, EventArgs e){
this.Visible = false; this.Hide();}
}
}
Can anyone tell me why the form is still displaying
Thanks
Martin