Re: complie Errors
- From: "Roger Vale" <roger.vale@xxxxxxxxxxxxxx>
- Date: Sat, 30 Dec 2006 08:35:36 -0000
Ok thanks for all the help and assistance
its just very annoying and just for information when I run the application on the device the firts chance messages still appear.
and it does slow the device.
When I run standalone then you are correct the device runs at normal speed.
Once again thanks for the help
I will continue to watch this group as it appears to be well used and very helpful
Good luck to all and Happy New Year
Roger
"Stephany Young" <noone@localhost> wrote in message news:%23nmQPm%23KHHA.3552@xxxxxxxxxxxxxxxxxxxxxxx
You're right. The PictureBox.Load method is not exposed in the Compact Framwork.
I emphasise again that it is nothing to worry about unless it is causing an unhandled exception to be thrown. If it is then handle it.
The 'first chance' messages only appear when you are in 'debug' and then (as far as I am aware) only if you are running in the IDE.
"Roger Vale" <roger.vale@xxxxxxxxxxxxxx> wrote in message news:eedLsK%23KHHA.5104@xxxxxxxxxxxxxxxxxxxxxxxthanks for your reply
I have tried that and there is no change in the error :(
as far as Stephany idea of using load load is not a member of PictureBox maybe that may throw some more light on the problem
Roger
"Tom Leylan" <tleylan@xxxxxxxxxx> wrote in message news:uPuA7g8KHHA.780@xxxxxxxxxxxxxxxxxxxxxxxYou are loading a bitmap which is fine but the .Image property is of type Image, try to DirectCast leftImage and the error should go away. Alternatively (as Stephany pointed out) you can use Load() which takes the string as a parameter. I doubt that method would result in the same warning.
leftPb.Image = DirectCast(New Bitmap(boardImagesPath + CStr(boardPositionP1 - 1) + ".jpg"), Image)
Tom
"Roger Vale" <roger.vale@xxxxxxxxxxxxxx> wrote in message news:uyrEtc5KHHA.5000@xxxxxxxxxxxxxxxxxxxxxxxHi all
Visual studio 2005
Visual Basic
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
.
- Follow-Ups:
- Re: complie Errors
- From: Stephany Young
- Re: complie Errors
- References:
- complie Errors
- From: Roger Vale
- Re: complie Errors
- From: Tom Leylan
- Re: complie Errors
- From: Roger Vale
- Re: complie Errors
- From: Stephany Young
- complie Errors
- Prev by Date: Re: System Restore
- Next by Date: Re: How to modify label.text in a dynamically generated label in VB.net
- Previous by thread: Re: complie Errors
- Next by thread: Re: complie Errors
- Index(es):
Relevant Pages
|