Quantcast
Channel: SharpDevelop Community
Viewing all articles
Browse latest Browse all 1764

Hi i need help for my school homework(Timer/Delay problem)

$
0
0

Hello im having a problem whit this code i dont now how to use the Timer

 

The idea is when you click the main boton the background change in colors (Blue-red) 50 times

i do this code but i dont now how to add a timer

/*
 * Created by SharpDevelop.
 * User: Ain
 * Date: 20/04/2017
 * Time: 19:49
 * 
 * To change this template use Tools | Options | Coding | Edit Standard Headers.
 */
using System;
using System.Collections.Generic;
using System.Drawing;
using System.Windows.Forms;

namespace nuevo
{

    publicpartialclassMainForm : Form
    {
        publicMainForm()
        {
            //
            // The InitializeComponent() call is required for Windows Forms designer support.
            //
            InitializeComponent();
            
            //
            // TODO: Add constructor code after the InitializeComponent() call.
            //
        }
        voidButton1Click(object sender, EventArgs e)
        {
            for (int i = 0; i < 50; i++) {
                BackColor = Color.Red;
                // i think i need to put the timer here
                BackColor = Color.Red;
                
            }
        }
        
    }

 

 

i try to go to desing/tools/Windows Form < and the end of the list there is a "Timer" but i dont have idea how to use it, i try to search documentation but all i found is sharpdevelop 1.0 :(


Viewing all articles
Browse latest Browse all 1764

Trending Articles