Go Back   Forum Care Forums > Development Reference Area > Visual Basic

Reply
 
LinkBack Thread Tools Display Modes
Compile Errors
Old
  (#1)
Roger Vale
Guest
 
Posts: n/a
Default Compile Errors - 06-04-2007, 09:33 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

   
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote

Re: Compile Errors
Old
  (#2)
Jan Hyde
Guest
 
Posts: n/a
Default Re: Compile Errors - 06-04-2007, 09:33 AM

"Roger Vale" <EMAIL REMOVED>'s wild thoughts
were released on Fri, 29 Dec 2006 10:40:18 -0000 bearing the
following fruit:

>Hi all
>
>Visual studio 2005


You need to ask in a 'dotnet' group, this group is for VB
'cl***ic'

J

>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)

   
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On





Contact Us - Forum Care Forums - Archive - Top