Re: complie Errors

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance



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@xxxxxxxxxxxxxxxxxxxxxxx
thanks 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@xxxxxxxxxxxxxxxxxxxxxxx
You 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@xxxxxxxxxxxxxxxxxxxxxxx
Hi 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







.



Relevant Pages

  • Re: complie Errors
    ... 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 ... try to DirectCast leftImage and the error should go away. ... Alternatively (as Stephany pointed out) you can use Loadwhich takes the string as a parameter. ... windows mobile application ...
    (microsoft.public.dotnet.languages.vb)
  • Re: Form loading takes forever after migration
    ... Is there a chance that the network over which the Access front-end links to ... Have an Access application with linked tables to a SQL server. ... By that I recon the problem is before the load event of the main form. ...
    (microsoft.public.access.externaldata)
  • Re: Tories dismayed and paralysed....
    ... It would be a chance for their obscenely wealthy supporters to buy up a load ... of cheap houses and also throw some ordinary working people out on the ...
    (uk.politics.misc)
  • Re: Tories dismayed and paralysed....
    ... It would be a chance for their obscenely wealthy supporters to buy up a load ... of cheap houses and also throw some ordinary working people out on the ...
    (uk.politics.misc)
  • Re: ImageIcon memory sizes
    ... > ..When I get a chance I'm going to try the alternate ... > to paint the image myself. ... I found the nes approach was to load the image bytes ... yourself and use Toolkit.createImageto stamp out an ...
    (comp.lang.java.programmer)