How to: Load and Display Metafiles
Theclass, which inherits from the class, provides methods for recording, displaying, and examining vector images.
To display a vector image (metafile) on the screen, you need a Metafile object and aobject. Pass the name of a file (or a stream) to a Metafile constructor. After you have created a Metafile object, pass that Metafile object to the method of a Graphics object.
The example creates a Metafile object from an EMF (enhanced metafile) file and then draws the image with its upper-left corner at (60, 10).
The following illustration shows the metafile drawn at the specified location.
Compiling the Code
The preceding example is designed for use with Windows Forms, and it requires e, which is a parameter of the event handler.