FRIENDS,
i want the code for hide the first form in 10 seconds and show the form2.
i have using the below code but it open the second form continously...
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
namespace Steganography
{
public partial class Form1 : Form
{
//for animating the resource file
int i = 0;
private Form2 next;
public Form1()
{
InitializeComponent();
Timer timer1 = new Timer();
timer1.Interval = 2000;
// here 1 second = 1000
// so 60 seconds=60000
timer1.Start();
timer1.Tick += new EventHandler(Ticks);
}
private void timer1_Tick(object sender, EventArgs e)
{
//animating i=o declared first
i++;
if (i > 8) i = -5;
switch (i)
{
case 1: pictureBox1.Image = Steganography.Properties.Resources.Rotate1;
break;
case 3: pictureBox1.Image = Steganography.Properties.Resources.Rotate2; break;
case 4: pictureBox1.Image = Steganography.Properties.Resources.Rotate3; break;
case 5: pictureBox1.Image = Steganography.Properties.Resources.Rotate4; break;
case 6: pictureBox1.Image = Steganography.Properties.Resources.Rotate5; break;
case 7: pictureBox1.Image = Steganography.Properties.Resources.Rotate6; break;
case 8: pictureBox1.Image = Steganography.Properties.Resources.Rotate7; break;
case 9: pictureBox1.Image = Steganography.Properties.Resources.Rotate8; break;
}
}
private void pictureBox1_Click(object sender, EventArgs e)
{
}
private void Form1_Mouseclick(object sender, EventArgs e)
{
Application.Exit();
}
private void Form1_Load(object sender, EventArgs e)
{
}
private void Ticks(object sender, EventArgs e)
{
next = new Form2();
next.Show();
this.Hide();
}
}
}
plz give a litte bit of code for me