Login or Sign up Help | Site Map
Connecting Tech Pros Worldwide

Compile Errors

Question posted by: Roger Vale (Guest) on December 29th, 2006 09:45 AM
Hi all

Visual studio 2005
windows mobile application

I am getting this from the imediate window A first chance exception of type
'System.InvalidCastException' occurred in System.Drawing.dll

Now the program still runs but this error seems to appear every time i swap
an image from a file

Code i am using is as follows

Dim leftImage As Bitmap


leftImage = New Bitmap(boardImagesPath +
CStr(boardPositionP1 - 1) + ".jpg")
leftPb.Image = leftImage


I dont know if this is enough information any help would be great

Thanks in advance

Roger

Would you like to answer this question?
Sign up for a free account, or Login (if you're already a member).
Jan Hyde's Avatar
Jan Hyde
Guest
n/a Posts
December 29th, 2006
12:05 PM
#2

Re: Compile Errors
"Roger Vale" <roger.vale@btinternet.com>'s wild thoughts
were released on Fri, 29 Dec 2006 10:40:18 -0000 bearing the
following fruit:
Quote:
Originally Posted by
>Hi all
>
>Visual studio 2005


You need to ask in a 'dotnet' group, this group is for VB
'classic'

J
Quote:
Originally Posted by
>windows mobile application
>
>I am getting this from the imediate window A first chance exception of type
>'System.InvalidCastException' occurred in System.Drawing.dll
>
>Now the program still runs but this error seems to appear every time i swap
>an image from a file
>
>Code i am using is as follows
>
>Dim leftImage As Bitmap
>
>
leftImage = New Bitmap(boardImagesPath +
>CStr(boardPositionP1 - 1) + ".jpg")
leftPb.Image = leftImage
>
>
>I dont know if this is enough information any help would be great
>
>Thanks in advance
>
>Roger



Jan Hyde (VB MVP)

--
Show me a piano falling down a mineshaft and I'll show you A-flat minor

(Karen Mascew)


 
Not the answer you were looking for? Post your question . . .
182,494 Experts ready to help you find a solution.
Sign up for a free account, or Login (if you're already a member).

  • Didn't find the answer you were looking for?
    Post Your Question
  • Top Community Contributors