Compile Errors

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Roger Vale

    #1

    Compile Errors

    Hi all

    Visual studio 2005
    windows mobile application

    I am getting this from the imediate window A first chance exception of type
    'System.Invalid CastException' 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(boardIma gesPath +
    CStr(boardPosit ionP1 - 1) + ".jpg")
    leftPb.Image = leftImage


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

    Thanks in advance

    Roger

  • Jan Hyde

    #2
    Re: Compile Errors

    "Roger Vale" <roger.vale@bti nternet.com>'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
    'classic'

    J
    >windows mobile application
    >
    >I am getting this from the imediate window A first chance exception of type
    >'System.Invali dCastException' 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(boardIma gesPath +
    >CStr(boardPosi tionP1 - 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)

    Comment

    Working...