--- title: "How to: Load and Display Metafiles" ms.date: "03/30/2017" dev_langs: - "csharp" - "vb" helpviewer_keywords: - "examples [Windows Forms], metafiles" - "metafiles [Windows Forms], displaying" ms.assetid: 60af1714-f148-4d85-a739-0557965ffa73 --- # How to: Load and Display Metafiles The class, which inherits from the class, provides methods for recording, displaying, and examining vector images. ## Example To display a vector image (metafile) on the screen, you need a object and a object. Pass the name of a file (or a stream) to a constructor. After you have created a object, pass that object to the method of a object. The example creates a 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. ![Screenshot showing image position.](./media/how-to-load-and-display-metafiles/metafile-drawn-specified-location.png "imageposition2") [!code-csharp[System.Drawing.WorkingWithImages#41](~/samples/snippets/csharp/VS_Snippets_Winforms/System.Drawing.WorkingWithImages/CS/Class1.cs#41)] [!code-vb[System.Drawing.WorkingWithImages#41](~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.WorkingWithImages/VB/Class1.vb#41)] ## 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. ## See also - [Working with Images, Bitmaps, Icons, and Metafiles](working-with-images-bitmaps-icons-and-metafiles.md)