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 1089591
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T23:14:43+00:00 2026-05-16T23:14:43+00:00

I have following code in the form_Load function System.Windows.Forms.Timer newtimer = new Timer(); newtimer.Tick

  • 0

I have following code in the form_Load function

System.Windows.Forms.Timer newtimer = new Timer();
newtimer.Tick += new EventHandler(refreshinfo);
newtimer.Start();
newtimer.Interval = 20000;

The “refreshinfo” function goes like this:

private void refreshinfo(object source,EventArgs e)
{
       // Some code here
}

The function “refreshinfo” is called after the 20 seconds. So far so good. Problem is that i want “refreshinfo” to be called on form_Load event also. So that i can get the desired results from “refreshinfo” when the user loads this form.

  • 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-05-16T23:14:44+00:00Added an answer on May 16, 2026 at 11:14 pm
    public void Form_Load(object sender, EventArgs e)
    {
        // Invoke it after 20 seconds
        Timer newtimer = new Timer();
        newtimer.Tick += refreshinfo;
        newtimer.Interval = 20000;
        newtimer.Start();
    
        // Invoke it now
        refreshinfo(sender, e);
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have the following code: // Form the continuities list string[] continuities = new
I have the following form code: # forms.py class SomeForm(forms.Form): hello = forms.CharField(max_length=40) world
I have the following code written, <?php require_once products.php; $test = new Products; $array
I have the following jquery code $(document).ready(function() { //Default Action $(#playerList).verticaltabs({speed: 500,slideShow: false,activeIndex: <?=$tab;?>});
I have 3 forms and they each have their own grids. The following code
I have the following code: JS <script type=text/javascript> $(function(){ $('#fgotpwfield').hide(); $('#login_submit').click(function() { $('#form_result').fadeOut('fast'); $('#myccrxlogin
I have following jQuery code $('a.editpo, a.resetpass').click(function(event){ event.preventDefault(); var urlToCall = $(this).attr('href'); var hyperlinkid
i have the following code that opens a dialogue with a View. $('.bulkEditlink').click(function ()
I have the following code I use to insert form data into a single
We have the following code working for a complex rails form with checkboxes. I'm

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.