Click here to Skip to main content
15,884,298 members

Comments by sri apple (Top 6 by date)

sri apple 12-Dec-12 6:31am View    
here my problem is display Form1 is two times...
sri apple 12-Dec-12 5:57am View    
Timer timer = new Timer();
public Form2()
{
InitializeComponent();

timer1.Tick += new EventHandler(timer1_Tick); // Everytime timer ticks, timer_Tick will be called
timer1.Interval = (1500) * (10); // Timer will tick evert 10 seconds
timer1.Enabled = true; // Enable the timer
timer1.Start(); // Start the timer

}

private void timer1_Tick(object sender, EventArgs e)
{

timer1.Stop();


timer1.Enabled = false;


Form1 f = new Form1();
f.Show();
this.Hide();




}
sri apple 12-Dec-12 5:56am View    
Deleted
Timer timer = new Timer();
public Form2()
{
InitializeComponent();

timer1.Tick += new EventHandler(timer1_Tick); // Everytime timer ticks, timer_Tick will be called
timer1.Interval = (1500) * (10); // Timer will tick evert 10 seconds
timer1.Enabled = true; // Enable the timer
//timer1.Start(); // Start the timer

}

private void timer1_Tick(object sender, EventArgs e)
{

timer1.Stop();


timer1.Enabled = false;


Form1 f = new Form1();
f.Show();
this.Hide();




}
sri apple 12-Dec-12 5:06am View    
Here i am using Timer's Tick event...
but Tick event loop is continue for two times.
sri apple 12-Dec-12 4:35am View    
if user log-in into page after he can't do any thing then automatically log-out from the page...