|
-
December 26th, 2008, 06:26 PM
#1
[RESOLVED] Splash Form Timer.Tick - not Working
Hi folks,
My Splash screen did appear upon execution of my program, and then fade out, but now its not working and I can't figure it out, but I know its simple! Can someone help debug it please?
My time is set to 'Enabled' and Interval '1000' in properties...... 
This is the code:
Code:
public partial class MainForm : Form
{
SplashScreen SplashForm = new SplashScreen();
int timerClock = 0;
public MainForm()
{
InitializeComponent();
}
private void MainForm_Load(object sender, EventArgs e)
{
SplashForm.Show();
timer1.Enabled = true;
timer1.Tick += new System.EventHandler(this.timer1_Tick);
}
private void timer1_Tick(object sender, EventArgs e)
{
if (timerClock >= 40)
{
SplashForm.Opacity = SplashForm.Opacity - .4;
}
timerClock++;
if (timerClock == 20)
{
SplashForm.Close();
this.Opacity = 100;
timer1.Enabled = false;
}
}
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|