i need some help
-
hi i have two forms i want after 3 seconds the first form is hiden and the second one is appeared sorry for that silly question but the first form has user control that playing a movie i trying to use the usually code to hide the first one but it is not disappeared and the second is appeared thanks very much Mohamed
-
hi i have two forms i want after 3 seconds the first form is hiden and the second one is appeared sorry for that silly question but the first form has user control that playing a movie i trying to use the usually code to hide the first one but it is not disappeared and the second is appeared thanks very much Mohamed
Hard to tell without seeing the code. Could you post relevant code here?
Navaneeth How to use google | Ask smart questions
-
Hard to tell without seeing the code. Could you post relevant code here?
Navaneeth How to use google | Ask smart questions
in form1 this code
public partial class Form1 : Form
{public Form1() { InitializeComponent(); Form2 gv = new Form2(); dd(); this.Hide(); } private void dd() { Form2 ss = new Form2(); ss.Show(); }
sorry i can not write the design of form 1 part but it an user control that represent a .avi video thanks very much Mohamed
-
in form1 this code
public partial class Form1 : Form
{public Form1() { InitializeComponent(); Form2 gv = new Form2(); dd(); this.Hide(); } private void dd() { Form2 ss = new Form2(); ss.Show(); }
sorry i can not write the design of form 1 part but it an user control that represent a .avi video thanks very much Mohamed
I believe
Form1
is your start-up form. WhenApplication.Run(new Form1())
is executed, it sets theForm1
's visibility to true. This happens after your call tothis.Hide()
inForm1
's constructor. This is the reason why first form is still visible. Are you looking to implement a splash-screen? If yes, this is not the correct method. Try the following points- Show the Form1 before the call to
Application.Run
- Keep a timer on Form1 with interval as 3secs and when timer ticks, unload the form.
- Instantiate Form2 and start message loop on that.
Application.Run(new Form2())
.
Navaneeth How to use google | Ask smart questions
modified on Thursday, September 24, 2009 4:47 AM
- Show the Form1 before the call to