際際滷

際際滷Share a Scribd company logo
Vp lecture 5 ararat
 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
Example
presents an interface for date selection. It allows the
user to select a valid DateTime without much effort
on your part.
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);
}
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
Vp lecture 5 ararat

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