Sponsored Ad

Monday, September 28, 2009

C# Form

One of the a lot of advantageous elements on any Windows anatomy is the ComboBox (often accepted as a drop-down box). It allows the user to accept from an account from authentic account of options (for instance the canicule of the week) and again the programmer can use the best abroad in the appliance (for archetype to acquaint the user from which planet the day name is derived). All of this can be accomplished actual calmly with C#.

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using System.Threading;
namespace WindowsFormsApplication1.Forms
{
    public partial class frmMain : Form
    {
        public frmMain()
        {
            InitializeComponent();
        }
        private void frmMain_Load(object sender, EventArgs e)
        {
            this.Text = "Original";
            this.Left = 0;
            Form f = new Form();
            f.Text = "Manual";
            f.Show();
            f.Left = this.Width;
            TimerCallback tCallback = new TimerCallback(Timer_Tick);
            System.Threading.Timer timer = new System.Threading.Timer(tCallback, null, 1000, System.Threading.Timeout.Infinite);
        }

        void Timer_Tick(object o)
        {
            Form f = new Form();
            f.Text = "Timer";
            f.Show();
            f.Left = this.Width * 2;
        }
    }
}

0 comments:

Post a Comment

Sponsored Ad

Website Update

Followers