Re: InvalidcastException in BitMap call



You need a slash in front of program files ie:

bmp = New BitMap("\Program Files\1.png")

Regards
Simon.

"HW" <hw@xxxxxxxxxxx> wrote in message
news:e02sxW2nGHA.1808@xxxxxxxxxxxxxxxxxxxxxxx
Hi, I'm creating BitMap as follows

bmp = New BitMap("Program Files\1.png")

This is causing a Invalid cast Exception, call stack suggests its in the
_InitFromStream method. What is wrong with the above???



.