首页 新闻 会员 周边

具有索引像素格式的图像不支持 SetPixel。

0
悬赏园豆:50 [已解决问题] 解决于 2013-11-25 10:28

Winform程序,使用到了BCG的toolbarMenuButton菜单控件,该程序在电脑上直接运行是可以的,但通过电信运营商的4A平台(安全管控系统)登陆来查看这个程序,当点击菜单弹出下一级菜单的时候会出现下面这个异常,导致菜单功能不可用,有人知道是怎么回事吗?

System.InvalidOperationException: 具有索引像素格式的图像不支持 SetPixel。
   在 System.Drawing.Bitmap.SetPixel(Int32 x, Int32 y, Color color)
   在 BCGSoft.Shared.DrawManager.PrepareShadowBitmap(Graphics grph, Int32 nDepth, Rectangle rect, Boolean horz, Int32 iMinBrightness, Int32 iMaxBrightness, Color colorBase)
   在 BCGSoft.ControlBars.PopupMenu.OnDelayShowTimerTick(Object sender, EventArgs e)
   在 System.Windows.Forms.Timer.OnTick(EventArgs e)
   在 System.Windows.Forms.Timer.TimerNativeWindow.WndProc(Message& m)
   在 System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)

注:有些菜单是有图标的,有些菜单没有图标,都会出现这个异常。

王仙客的主页 王仙客 | 初学一级 | 园豆:12
提问于:2013-11-02 14:54
< >
分享
最佳答案
0

http://stackoverflow.com/questions/15049562/how-to-save-image-in-indexed-format-and-get-its-palette

收获园豆:50
Yu | 专家六级 |园豆:12980 | 2013-11-02 15:33
清除回答草稿
   您需要登录以后才能回答,未注册用户请先注册