How to write and read a Meta file from the a stream.

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance

From: Amendra TheUltimate via .NET 247 (anonymous_at_dotnet247.com)
Date: 10/31/04


Date: Sun, 31 Oct 2004 03:52:35 -0800

Hi,

I have been trying to write to a memory stream and read and display a meta file. I was ok with drawing on to the metafile. But what I cannot seem to do is read from the memory stream that I have written to. I get an exception saying, Additional information: A generic error occurred in GDI+.

I tried with a Filestream, here to I had to save the file and reopen it. Then it worked. I need to write the meta file contents to a memory stream and on the fly read from the stream. I would be glad if some one can help me with this :).

A small sample may do.

Also if any one knows how to change the resolution of a new metafile that we are to create, please let me know. It seems to be taking in the resolution of the reference device context.

Thanks
--------------------------------
From: Amendra TheUltimate

-----------------------
Posted by a user from .NET 247 (http://www.dotnet247.com/)

<Id>iMWAlBbW5UyoiF7JSwb7UA==</Id>



Relevant Pages

  • How to write and read a Meta file from the a stream.
    ... I tried with a Filestream, here to I had to save the file and reopen it. ... I need to write the meta file contents to a memory stream and on the fly read from the stream. ... Also if any one knows how to change the resolution of a new metafile that we are to create, ...
    (microsoft.public.dotnet.framework.windowsforms)
  • How to write and read a Meta file from the a stream.
    ... I tried with a Filestream, here to I had to save the file and reopen it. ... I need to write the meta file contents to a memory stream and on the fly read from the stream. ... Also if any one knows how to change the resolution of a new metafile that we are to create, ...
    (microsoft.public.dotnet.framework.windowsforms)
  • How to write and read a Meta file from the a stream.
    ... I tried with a Filestream, here to I had to save the file and reopen it. ... I need to write the meta file contents to a memory stream and on the fly read from the stream. ... Also if any one knows how to change the resolution of a new metafile that we are to create, ...
    (microsoft.public.dotnet.framework.windowsforms)
  • How to write and read a Meta file from the a stream.
    ... I tried with a Filestream, here to I had to save the file and reopen it. ... I need to write the meta file contents to a memory stream and on the fly read from the stream. ... Also if any one knows how to change the resolution of a new metafile that we are to create, ...
    (microsoft.public.dotnet.framework.windowsforms)
  • Re: Change resulution (DPI) of a device context
    ... > When creating a enhanced meta file the resolution is set to the resolution ... I have two ways to influence the resolution: ... The mapping mode of the device context defines the granularity of the data which is probably what you're after in this ...
    (microsoft.public.vb.winapi.graphics)