Visual Programming using C#
Lecturer: Saman M. Almufti / Kurdistan Region, Nawroz University, (Visitor : Ararat Institute)
facebook: https://www.facebook.com/saman.malmufti
YouTube link: https://youtu.be/KTxJs0uK4HU
IN THIS LECTURE:
1- Introduction to PictureBox
2- Introduction to DateTimePicker
1 of 7
Download to read offline
More Related Content
Vp lecture 5 ararat
2. PictureBox provides a rectangular region for an image.
It supports many image formats.
Allows you to include images on your form.
Important Properties:
Image (Browse to file)
Location
SizeMode
Normal, StretchImage, AutoSize, CenterImage, Zoom
BorderStyle
4. presents an interface for date selection. It allows the
user to select a valid DateTime without much effort
on your part.
5. In this project
Drag down a button (by clicking in the button a message will
show the date )
Drag down a dateTimePicker (by double click in the
dateTimePicker you can change the date (year, month and day)
private void button1_Click(object sender, EventArgs e)
{
MessageBox.Show(dateTimePicker1.Text);
}
6. private void Form1_Load(object sender, EventArgs e)
{
dateTimePicker1.CustomFormat = "ddd,dd-MM-yy";
dateTimePicker1.Format = DateTimePickerFormat.Custom;
}
Any format
Example
dd,mm,yy
ddd-mmm-yyy