Re: Graphics.TextRenderingHint throw exception?



It's been done too many times before. Chris Sell's and Mahesh Chands books are great.

Anyway, I'm waaaay to busy working ;-)

--
Bob Powell [MVP]
Visual C#, System.Drawing

Ramuseco Limited .NET consulting
http://www.ramuseco.com

Find great Windows Forms articles in Windows Forms Tips and Tricks
http://www.bobpowell.net/tipstricks.htm

Answer those GDI+ questions with the GDI+ FAQ
http://www.bobpowell.net/faqmain.htm

All new articles provide code in C# and VB.NET.
Subscribe to the RSS feeds provided and never miss a new article.





schneider wrote:
Was think of writing some kind of generic wrapper to see if i am disposing it too early...

Thanks, for the help, and I'm still waiting for you to publish a book on .NET Drawing...

Thanks again,
Schneider


"Bob Powell [MVP]" <bob@xxxxxxxxxxxxxxxxxxxxxxx> wrote in message news:6DF1B4BF-96D7-4FEB-995E-38C3E161107C@xxxxxxxxxxxxxxxx
Disposing the graphics is a common problem. You'll need to check your code carefully.

--
--
Bob Powell [MVP]
Visual C#, System.Drawing

Ramuseco Limited .NET consulting
http://www.ramuseco.com

Find great Windows Forms articles in Windows Forms Tips and Tricks
http://www.bobpowell.net/tipstricks.htm

Answer those GDI+ questions with the GDI+ FAQ
http://www.bobpowell.net/faqmain.htm

All new articles provide code in C# and VB.NET.
Subscribe to the RSS feeds provided and never miss a new article.


"schneider" <eschneider.news.ms@xxxxxxxxxxxxxxxxxxxx> wrote in message news:Obv5zTUfIHA.4164@xxxxxxxxxxxxxxxxxxxxxxx
There is a lot of code and I can only reproduce it through a set of mouse sequences.
I think maybe the graphics has been disposed, but can't be sure. Seems strange the thow an error reading a property. Every property in graphics says "Invalid parameter value". What parameter?

it craps out on:

Graphics.TextRenderingHint

or

Graphics.Save




"Bob Powell [MVP]" <bob@xxxxxxxxxxxxxxxxxxxxxxx> wrote in message news:87386324-AFC5-4C6F-84B1-C0104F40D202@xxxxxxxxxxxxxxxx
Can you post an example of when this occurs?

--
--
Bob Powell [MVP]
Visual C#, System.Drawing

Ramuseco Limited .NET consulting
http://www.ramuseco.com

Find great Windows Forms articles in Windows Forms Tips and Tricks
http://www.bobpowell.net/tipstricks.htm

Answer those GDI+ questions with the GDI+ FAQ
http://www.bobpowell.net/faqmain.htm

All new articles provide code in C# and VB.NET.
Subscribe to the RSS feeds provided and never miss a new article.


"schneider" <eschneider@xxxxxxxxxxxxx> wrote in message news:OJ1JATweIHA.3724@xxxxxxxxxxxxxxxxxxxxxxx
Under some cases Graphics.TextRenderingHint and also Graphics.Save throws an exception?

I can't seem to understand why. or what I'm doing wrong? and the error message is useless.

Anyone know whats going on?

Thanks
Schneider




.



Relevant Pages

  • Re: Custom Zoom & Performance
    ... Find great Windows Forms articles in Windows Forms Tips and Tricks ... Answer those GDI+ questions with the GDI+ FAQ ... the scaled pixel ...
    (microsoft.public.dotnet.framework.drawing)
  • Re: Printing graphics/text that span multiple pages
    ... Find great Windows Forms articles in Windows Forms Tips and Tricks ... Answer those GDI+ questions with the GDI+ FAQ ... You need to figure out how many pages you need and then render your ...
    (microsoft.public.dotnet.framework.drawing)
  • Re: Drawing backgeound image slows down form performance
    ... Find great Windows Forms articles in Windows Forms Tips and Tricks ... Answer those GDI+ questions with the GDI+ FAQ ... > I have a windows form application that draws the background with a color ...
    (microsoft.public.dotnet.framework.drawing)
  • Re: Hotspots in graphic
    ... Find great Windows Forms articles in Windows Forms Tips and Tricks ... Answer those GDI+ questions with the GDI+ FAQ ... > What is the best way to draw that image on the screen? ...
    (microsoft.public.dotnet.framework.windowsforms.controls)
  • Re: Hotspots in graphic
    ... Find great Windows Forms articles in Windows Forms Tips and Tricks ... Answer those GDI+ questions with the GDI+ FAQ ... > What is the best way to draw that image on the screen? ...
    (microsoft.public.dotnet.framework.windowsforms.controls)

Loading