Bitmap Constructor (String^)
.NET Framework (current version)
Initializes a new instance of the Bitmap class from the specified file.
Assembly: System.Drawing (in System.Drawing.dll)
Parameters
- filename
-
Type:
System::String^
The bitmap file name and path.
| Exception | Condition |
|---|---|
| FileNotFoundException | The specified file is not found. |
The file name and path can be relative to the application or an absolute path. Use this constructor to open images with the following file formats: BMP, GIF, EXIF, JPG, PNG and TIFF. For more information about supported formats, see Types of Bitmaps. The file remains locked until the Bitmap is disposed.
.NET Framework
Available since 1.1
Available since 1.1
Show: