Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8231575
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T17:32:28+00:00 2026-06-07T17:32:28+00:00

Currently I’m moving from java to c# and I’m full of crazy questions. I’m

  • 0

Currently I’m moving from java to c# and I’m full of crazy questions.
I’m trying new things on a windows form application and now,I would like to create a loop wich is executing a code every 1 minute,the problem is that I have no idea where to put this code.
For example,the form structure is like:

using System;

namespace Tray_Icon
{
    public partial class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent();
        }

        private void Form1_Load(object sender, EventArgs e)
        {

        }

        private void button1_Click(object sender, EventArgs e)
        {
            notifyIcon1.ShowBalloonTip(5000);


        }

        private void notifyIcon1_BalloonTipClicked(object sender, EventArgs e)
        {
            label1.Text = "Baloon clicked!";
        }

        private void notifyIcon1_BalloonTipClosed(object sender, EventArgs e)
        {
            label1.Text = "baloon closed!";
        }

        private void contextMenuStrip1_Opening(object sender, CancelEventArgs e)
        {

        }

        private void option1ToolStripMenuItem_Click(object sender, EventArgs e)
        {
            //some code here
        }

        private void option2ToolStripMenuItem_Click(object sender, EventArgs e)
        {
            //some code here
        }

        private void option3ToolStripMenuItem_Click(object sender, EventArgs e)
        {
            label1.Text = "Option 3 clicked!";
        }

        private void notifyIcon1_MouseDoubleClick(object sender, MouseEventArgs e)
        {
            option1ToolStripMenuItem_Click(this, null);
        }

        private void closeToolStripMenuItem_Click(object sender, EventArgs e)
        {
            this.Close();
        }

        private void btnWrite_Click(object sender, EventArgs e)
        {
//code here

        }
    }
}

Where should I put the loop code? 🙁

Thanks in advance for ANY replay!!!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-07T17:32:31+00:00Added an answer on June 7, 2026 at 5:32 pm

    Add a Timer to your form:

    enter image description here

    set its Interval property to 60000 (one minute in milliseconds) and Enabled to True:

    enter image description here

    and attach an event handler to the Timer.Tick event, e.g. by double-clicking the timer in the Forms designer:

    private void timer1_Tick(object sender, EventArgs e)
    {
        // do something here. It will be executed every 60 seconds
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Currently playing about with KnockoutJS. Just trying to update an observable array from a
currently I have a row of aliens, and now I'm trying to make bullets
Currently, I am writing a MiddleWare application that synchronizes information between and accounting application
Currently I'm starting a new Activity and calling finish on a current one. Is
Currently I am trying to use a bunch of custom perl modules, test.pm as
Currently i have a node.js and socket.io application in development on my local machine
I want use html5's new tag to play a wav file (currently only supported
Currently, I have a GWT based application /app.htm It displays an openId login button
Currently i am consuming web service from android by the method SOAP.Here i need
Currently writing a C# application it should do backups using GIT in the background.

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.