Connecting Tech Pros Worldwide Help | Site Map

"NotSupportedException was unhandled + System.Drawing.Bitmap"

Newbie
 
Join Date: Nov 2007
Posts: 16
#1: Jan 9 '08
Hi buddys,

I have the followinf Bug.........
when i run my application "NotSupportedException was un handled" in "System.Drawing.Icon"
for the following designer code....

Me.picImgMain.Image = CType(resources.GetObject("picImgMain.Image"), System.Drawing.Image)

can u give any idea
markmcgookin's Avatar
Moderator
 
Join Date: Dec 2006
Location: Northern Ireland / England
Posts: 546
#2: Jan 9 '08

re: "NotSupportedException was unhandled + System.Drawing.Bitmap"


Quote:

Originally Posted by wingsganesh

Hi buddys,

I have the followinf Bug.........
when i run my application "NotSupportedException was un handled" in "System.Drawing.Icon"
for the following designer code....

Me.picImgMain.Image = CType(resources.GetObject("picImgMain.Image"), System.Drawing.Image)

can u give any idea

I take it you have dropped a picture onto a form or added a picturebox to a form and added a picture to it?

What is the type of file that you are trying to add to the form?

i.e. .png, .gif, .jpg etc?

Mark
Newbie
 
Join Date: Nov 2007
Posts: 16
#3: Jan 9 '08

re: "NotSupportedException was unhandled + System.Drawing.Bitmap"


Hi mark,

Thanks for ur reply
I just drag one picture box and load image at design time, It is
".PNG" type image.

and one more thing, it ran successfully before one hour, The bug was raised when i add new form to my project .........
markmcgookin's Avatar
Moderator
 
Join Date: Dec 2006
Location: Northern Ireland / England
Posts: 546
#4: Jan 11 '08

re: "NotSupportedException was unhandled + System.Drawing.Bitmap"


Quote:

Originally Posted by wingsganesh

Hi mark,

Thanks for ur reply
I just drag one picture box and load image at design time, It is
".PNG" type image.

and one more thing, it ran successfully before one hour, The bug was raised when i add new form to my project .........

So it worked fine, then you added a new, different form and then the original form has stopped working. Have you tried deleting the image and compiling to see if that works? then adding it again and compiling?

Mark
Reply