Re: Problem with Graphics Class...

From: Bob Powell [MVP] (bob_at__spamkiller_bobpowell.net)
Date: 03/08/04


Date: Mon, 8 Mar 2004 10:22:52 +0100

Please post the code that causes the exception.

-- 
Bob Powell [MVP]
Visual C#, System.Drawing
Check out February's edition of Well Formed.
Non-client drawing, Graphics Transform stack and Flood-Filling
http://www.bobpowell.net/currentissue.htm
Answer those GDI+ questions with the GDI+ FAQ
http://www.bobpowell.net/gdiplus_faq.htm
Read my Blog at http://bobpowelldotnet.blogspot.com
"Sujith Manuel" <sujith@rarefind.com> wrote in message
news:Os92B%23MBEHA.1456@TK2MSFTNGP09.phx.gbl...
> Hi All,
>
> I have a problem with System.Drawing.Graphics class. Whenever I use an
> object of graphics class, after it goes out of scope, it's giving me an
> exception as follows:
>
> "An unhandled exception of type 'System.InvalidOperationException'
occurred
> in system.drawing.dll"
> "Additional information: The object is currently in use elsewhere."
>
> Iam also using Dispose() method of Graphics Class. Anybody knows about
this
> behavior and because of this it's consuming a lot of memory.
>
> Thanks in advance,
> Sujith Manuel.
>
>


Relevant Pages

  • Re: Problem with Graphics Class...
    ... If this code block is called mutiple times, then the exception keeps coming ... >> Iam also using Disposemethod of Graphics Class. ... >> Sujith Manuel. ...
    (microsoft.public.dotnet.framework.drawing)
  • Problem with Graphics Class...
    ... object of graphics class, after it goes out of scope, it's giving me an ... "An unhandled exception of type 'System.InvalidOperationException' occurred ... Iam also using Disposemethod of Graphics Class. ... Sujith Manuel. ...
    (microsoft.public.dotnet.framework.drawing)
  • Re: Problem mit Graphics Objekt
    ... Exception des OP. ... Graphics grfx1; ... IntPtr pointer1; ... public void DoIt1(Graphics grfx, IntPtr pointer) { ...
    (microsoft.public.de.german.entwickler.dotnet.csharp)
  • Re: generic error in GDI+ occurs when drawing windows metafile
    ... The print jobs are not the same length. ... print request results in an "operation completed" exception, ... >>I am getting a sporadic external exception when drawing a windows metafile. ... >> private void PrintLogo(Graphics graphics) ...
    (microsoft.public.dotnet.framework)
  • Re: generic error in GDI+ occurs when drawing windows metafile
    ... The print jobs are not the same length. ... print request results in an "operation completed" exception, ... >>I am getting a sporadic external exception when drawing a windows metafile. ... >> private void PrintLogo(Graphics graphics) ...
    (microsoft.public.dotnet.framework)