本文介绍了编译错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述 29岁程序员,3月因学历无情被辞! 大家好 Visual studio 2005 Visual Basic windows移动应用程序 我从imediate窗口得到这个类型的第一次机会异常 'System.InvalidCastException''发生在System.Drawing.dll中 现在程序仍在运行,但每次我交换时都会出现此错误 文件中的图像 我使用的代码如下 Dim leftImage As Bitmap leftImage =新位图(boardImagesPath + CStr(boardPositionP1 - 1)+" .jpg") leftPb.Image = leftImage 我不知道这是否足够信息任何帮助都会很棒 提前致谢 Roger 解决方案 type 交换 Hi allVisual studio 2005Visual Basicwindows mobile applicationI am getting this from the imediate window A first chance exception of type''System.InvalidCastException'' occurred in System.Drawing.dllNow the program still runs but this error seems to appear every time i swapan image from a fileCode i am using is as followsDim leftImage As BitmapleftImage = New Bitmap(boardImagesPath +CStr(boardPositionP1 - 1) + ".jpg")leftPb.Image = leftImageI dont know if this is enough information any help would be greatThanks in advanceRoger 解决方案typeswap 这篇关于编译错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持! 阿里云证书,YYDS! 05-23 08:02