The document provides an overview of the PictureBox and DateTimePicker controls in Windows Forms applications, detailing their properties, methods, and events. The PictureBox control displays images and supports various formats, while the DateTimePicker allows users to select dates and times. Examples of usage for both controls are included to illustrate their functionality.
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0 ratings0% found this document useful (0 votes)
8 views3 pages
PictureBox and Date&Time Picker
The document provides an overview of the PictureBox and DateTimePicker controls in Windows Forms applications, detailing their properties, methods, and events. The PictureBox control displays images and supports various formats, while the DateTimePicker allows users to select dates and times. Examples of usage for both controls are included to illustrate their functionality.
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 3
PictureBox Control
Introduction:
The PictureBox control is used to display images in a Windows Forms
application. It supports various image formats such as JPG, PNG, BMP, GIF, and ICO. It is commonly used to display logos, profile pictures, or dynamically loaded images.
Properties:
1. Image - Sets the image displayed in the PictureBox.
2. SizeMode - Determines how the image is displayed (Normal,
StretchImage, AutoSize, CenterImage, Zoom).
3. BorderStyle - Defines the border (None, FixedSingle, Fixed3D).
4. BackColor - Sets the background color.
5. Enabled - Enables or disables the control.
6. Visible - Controls visibility of the PictureBox.
Methods:
1. Load() - Loads an image from a file or URL.
o Example: pictureBox1.Load("C:\\image.jpg");
2. Refresh() - Redraws the PictureBox.
3. Dispose() - Releases resources.
Events:
1. Click - Triggers when clicked.
2. MouseHover - Occurs when the mouse hovers over the PictureBox.