private void button1_Click_1(object sender, EventArgs e) { CreatMetaFile cMF = new CreatMetaFile(); Metafile mf = cMF.MakeMetafile(Screen.PrimaryScreen.Bounds.Width, Screen.PrimaryScreen.Bounds.Height, "test.emf"); // Draw on the metafile. cMF.DrawOnMetafile(mf); }
private void button1_Click_1(object sender, EventArgs e) { CreatMetaFile cMF = new CreatMetaFile(); Metafile mf = cMF.MakeMetafile(Screen.PrimaryScreen.Bounds.Width, Screen.PrimaryScreen.Bounds.Height, "test.emf"); // Draw on the metafile. cMF.DrawOnMetafile(mf); // Convert the metafile into a bitmap. // Bitmap bm = cMF.MetafileToBitmap(mf); // Display in various ways. // pictureBox1.Image = bm; // Original size. // pictureBox2.Image = bm; // Stretches pixelated. pictureBox3.Image = mf; // Stretches smoothly. }