using
System;
using
System.Collections.Generic;
using
System.ComponentModel;
using
System.Data;
using
System.Drawing;
using
System.Linq;
using
System.Text;
using
System.Threading.Tasks;
using
System.Windows.Forms;
namespace
WindowsFormsApp48 {
public
partial
class
Form1 : Form {
public
Form1()
{
InitializeComponent();
}
private
void
Form1_Load(
object
sender, EventArgs e)
{
Label l =
new
Label();
l.Location =
new
Point(183, 162);
l.Size =
new
Size(172, 20);
l.Text =
"Select Date and Time"
;
l.Font =
new
Font(
"Comic Sans MS"
, 12);
this
.Controls.Add(l);
DateTimePicker d =
new
DateTimePicker();
d.Location =
new
Point(360, 162);
d.Size =
new
Size(292, 26);
d.MaxDate =
new
DateTime(2500, 12, 20);
d.MinDate =
new
DateTime(1753, 1, 1);
d.Format = DateTimePickerFormat.Long;
d.Name =
"MyPicker"
;
d.Font =
new
Font(
"Comic Sans MS"
, 12);
d.Visible =
true
;
d.Value = DateTime.Today;
this
.Controls.Add(d);
}
}
}