问题描述
下面的代码给img.Picture赋值时出现灾难性错误,有谁知道为什么?shpPict=sheet.Shapes.AddOLEObject("Forms.Image.1",oMissing,false,false,oMissing,oMissing,oMissing,signCtrl.Object.ImgLeft,signCtrl.Object.ImgTop,signCtrl.Object.ImgWidth,signCtrl.Object.ImgHeight);OLEObjectoleObj=(OLEObject)sheet.OLEObjects(shpPict.Name);MSForms.Imageimg=(MSForms.Image)oleObj.Object;PycCppProxyImpl.OLEHelper.OleLoadPicturePath(gifName,null,0,0,refguid,outoPict);img.Picture=(stdole.StdPicture)oPict;
解决方案
时间: 2024-09-28 15:11:02