Loading picture objects
Visual Basic provides several ways to load a picture object:
-
Use LoadPicture to load from disk. Specifically, you can load a bitmap from a BMP or DIB file. You can load an icon from an ICO file or load a metafile from a WMF file. You can load a cursor from an ICO file or a CUR file.
-
Use LoadPicture with no argument to clear a picture file.
-
Assign one Picture property from another Picture property, from an Image property, or from any other property with StdPicture or Picture type.
-
Use LoadResPicture to load a picture from a resource file attached to your program. (See Chapter 8.)
-
Get a GDI object handle from a Windows API function and assign it
to the Picture property. There’s more to this than meets the eye, however, as you’ll see in Chapter 8.