473,385 Members | 1,838 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

Class allready exists error

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
Nov 19 '05 #1
1 887
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.

"Miro" <Mi**@discussions.microsoft.com> wrote in message
news:9D**********************************@microsof t.com...
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

Nov 19 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Murat Tasan | last post by:
hi, i am having a small problem with constructing an inner class. i am using an inner class (and not a static nested class) because the methods of the inner class need access to the enclosing...
12
by: Gaurav Veda | last post by:
Hi ! I am a poor mortal who has become terrified of Python. It seems to have thrown all the OO concepts out of the window. Penniless, I ask a basic question : What is the difference between a...
10
by: lkrubner | last post by:
I killed last night and a good chunk of today trying to figure out this one particular attempt to get a class and initialize it. My code is using a class method called getObject to include() a file...
7
by: Yngve | last post by:
Hi! I am trying to make two pointers at instances of the same class wich is beeing defined. But i get the following error from the compiler (MVC7): -------------------- ...
6
by: Jon Hyland | last post by:
Ok, I'm a little rusty on this, it should be a simple problem but I can't figure it out. How can I handle form events in my main code page?? I'm creating a Windows App in C#. Rather than make...
0
by: ruju00 | last post by:
I am getting an error in Login() method of the following class FtpConnection public class FtpConnection { public class FtpException : Exception { public FtpException(string message) :...
1
by: otrWalter | last post by:
I'm rolling my own little DB class (pls, I don't need to hear about how wonder this or that class is, thank you, I've reading over 2 dozen such libaries) and I have a question to this group... ...
1
by: wbsurfver | last post by:
Here is the problem, I am working with a bunch of old code so I can really restructure the includes, otherwise I guess I could change all the #include statements to #include-once. Anyway, If I...
20
by: tshad | last post by:
Using VS 2003, I am trying to take a class that I created to create new variable types to handle nulls and track changes to standard variable types. This is for use with database variables. This...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.