|
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;
namespace ControlTest
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
private void button1_Click(object sender, EventArgs e)
{
this.Dispose();
}
private void Form1_Load(object sender, EventArgs e)
{
// use negative numbers to express dates
// prior to 1/1/1970
// load with unix time
utConverter1.Text = "-885772800"; // a date prior to 1/1/1970
utConverter2.Text = "849312000";
utConverter3.Text = "999648000";
utConverter4.Text = "4000000000";
// load with normal dates
utConverter5.Text = "7/19/1960";
utConverter6.Text = "5/16/1933";
utConverter7.Text = "7/4/2008";
utConverter8.Text = "6/18/3100";
// refresh all of the controls
// to update the display
utConverter1.Refresh();
utConverter2.Refresh();
utConverter3.Refresh();
utConverter4.Refresh();
utConverter5.Refresh();
utConverter6.Refresh();
utConverter7.Refresh();
utConverter8.Refresh();
// move selection off custom controls
button1.Select();
}
}
}
|
By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.
If a file you wish to view isn't highlighted, and is a text file (not binary), please
let us know and we'll add colourisation support for it.
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.