ExtractIconEx("Shell32.dll", 0, largeIcon, smallIcon, 250); if (MIcon == MessageBoxIcon.Error | MIcon==MessageBoxIcon.Hand)
{
MessageBeep(30);
frmIcon = Icon.FromHandle(largeIcon[109]);
}我每次取到第十次的时候就报错
Icon.FromHandle(largeIcon[109]);
因为这里传进去的是 0
怎么回事呢?
{
MessageBeep(30);
frmIcon = Icon.FromHandle(largeIcon[109]);
}我每次取到第十次的时候就报错
Icon.FromHandle(largeIcon[109]);
因为这里传进去的是 0
怎么回事呢?
----------
那说明largeIcon[109]是0 啊,你要去找有哪些代码涉及到largeIcon的操作了。
IntPtr[] smallIcon=new IntPtr[250];
ExtractIconEx("Shell32.dll", 0, largeIcon, smallIcon, 250);
就是将 图片读到 largeIcon,smallIcon 里面去
我没有用DestroyIcon
跟这个有关系么?
我来试试