When i load up my application I want to Hide the start form and open up a
preview form,
Im trying with
private void Form1_Load(object sender, System.EventArgs e)
{
this.Hide();
Form form2 = new Form2();
form2.Show();
}
but its not hiding the first form,
what am i doing wrong?
but
Shishir Kumar Mishra - 25 Oct 2004 16:13 GMT
Hi,
Any specific reason to load form1 first? From application you can always
load your preview from first (Form2).
You can always creates instance of form1(main form) from preview and show it
after closing of form2.
Regards
Shishir Kumar Mishra
Manhattan Associates
> When i load up my application I want to Hide the start form and open up a
> preview form,
[quoted text clipped - 11 lines]
>
> but
Herfried K. Wagner [MVP] - 25 Oct 2004 16:26 GMT
"Leon" <Leon@discussions.microsoft.com> schrieb:
> When i load up my application I want to Hide the start form
> and open up a preview form,
In addition to the other reply:
> Im trying with
> private void Form1_Load(object sender, System.EventArgs e)
> {
> this.Hide();
Your form is not yet visible here!
> Form form2 = new Form2();
> form2.Show();
Your form will be visible here. In order to prevent the form from becoming
visible, use 'ShowDialog' instead of 'Show' or take a look at the
'Application' and 'ApplicationContext' classes.

Signature
Herfried K. Wagner [MVP]
<URL:http://dotnet.mvps.org/
Leon - 26 Oct 2004 07:23 GMT
I have an preview window and a edit window, what I want is that when I double
click a file it should open the preview mode, but otherwise if you start the
program manually it should open in edit mode, i then would like to have an
edit button in the preview form and a preview button in the edit form, so you
can jump between the two.
in the mainform:
if(args.Length != 0)
{
Application.Run(new Player(args[0]));
} else {
Application.Run(new Maker());
}
This works fine.. the problem is switching between the two forms...
Cheers
> When i load up my application I want to Hide the start form and open up a
> preview form,
[quoted text clipped - 11 lines]
>
> but