Class allready exists error

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi!

I create a picturebox in my aspx-site (just to get the graphics object),
cause I want to draw a map and save it as a JPG using the Bitmap class.
Occasionally I get this error that confuses me:

Class allready exists
System.ComponentModel.Win32Exception

the code-line that causes this error is:
Graphics g = pb.CreateGraphics();

Usually I have to wait for a while and then when I try again it works. But
then it comes back again.

Any ideas?

/Miro
 
Well, for a starter, you don't want to use ANY Windows Forms UI classes in
an ASP.Net app, and you don't have to. All you need is an Image or Bitmap,
and you can use the Graphics.FromImage() static method to get the graphics.

--
HTH,

Kevin Spencer
Microsoft MVP
..Net Developer
Neither a follower nor a lender be.
 
Back
Top