Advertisement

05.26.2008 at 10:32PM PDT, ID: 23433941
[x]
Attachment Details

C# Timer

Asked by precado999 in .NET, C# Programming Language, Microsoft Visual C#.Net

Tags: ,

I want to know how do you stop a timer in C#.net after you have called a function?Start Free Trial
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
24:
25:
26:
27:
28:
namespace StakeCamp
{
    public partial class startPage : Form
    {
        public startPage()
        {
            InitializeComponent();
 
            Timer timer = new Timer();
            timer.Interval = 3000;
            timer.Tick += new EventHandler(OnTick);
            timer.Enabled = true;
            timer.Start();
            //timer.Stop();
        }
 
        public void OnTick(object s, EventArgs ea)
        {
            mainMenu mMenu = new mainMenu();
            this.Hide();
            mMenu.Show();
            mMenu.Top = this.Top;
            mMenu.Left = this.Left;
            
        }
        
    }
}
[+][-]05.26.2008 at 10:48PM PDT, ID: 21649586

Assisted solutions are selected by the member who asked the question as a comment that contributed to their question's solution.

Start your 7-day free trial to view this Assisted Solution or ask the Experts your question.

 
[+][-]05.26.2008 at 11:08PM PDT, ID: 21649659

Assisted solutions are selected by the member who asked the question as a comment that contributed to their question's solution.

Start your 7-day free trial to view this Assisted Solution or ask the Experts your question.

 
[+][-]05.26.2008 at 11:13PM PDT, ID: 21649678

View this solution now by starting your 7-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zones: .NET, C# Programming Language, Microsoft Visual C#.Net
Tags: C#.Net, 2008
Sign Up Now!
Solution Provided By: Idle_Mind
Participating Experts: 4
Solution Grade: A
 
 
[+][-]05.27.2008 at 01:43AM PDT, ID: 21650306

Assisted solutions are selected by the member who asked the question as a comment that contributed to their question's solution.

Start your 7-day free trial to view this Assisted Solution or ask the Experts your question.

 
 
Loading Advertisement...
20080716-EE-VQP-32 / EE_QW_2_20070628