G
Guest
I am jumping into the compact framework for the first time and I am getting a
strange message in the Output window when trying to load a bmp into a
PictureBox. The bmp does display but the message I receive is, 'A first
chance exception of type 'System.InvalidCastException' occurred in
System.Drawing.dll'.
It occurs using VS2005 and deploying on the PocketPC emulator. It does not
occur when I do the same thing using VS2003 and the emulator.
The simple code is,
Dim myPic As Bitmap
'Form1.imagePath is a Static string which is filled when the user
selects a .bmp from a listbox
'the imagePath is "\windows\bt_help.bmp"
Try
myPic = New Bitmap(Form1.imagePath)
picImage.Image = myPic
Catch ex As Exception
Console.WriteLine("Error getting image. " + ex.Message)
End Try
strange message in the Output window when trying to load a bmp into a
PictureBox. The bmp does display but the message I receive is, 'A first
chance exception of type 'System.InvalidCastException' occurred in
System.Drawing.dll'.
It occurs using VS2005 and deploying on the PocketPC emulator. It does not
occur when I do the same thing using VS2003 and the emulator.
The simple code is,
Dim myPic As Bitmap
'Form1.imagePath is a Static string which is filled when the user
selects a .bmp from a listbox
'the imagePath is "\windows\bt_help.bmp"
Try
myPic = New Bitmap(Form1.imagePath)
picImage.Image = myPic
Catch ex As Exception
Console.WriteLine("Error getting image. " + ex.Message)
End Try