TypeInitializationException: “Gdip”的类型初始值设定项引发异常。
--TypeName: Gdip
StackTrace:
在 System.Drawing.SafeNativeMethods.Gdip.GdipCreateFontFromLogfontW(HandleRef hdc, Object lf, IntPtr& font)
在 System.Drawing.Font.FromLogFont(Object lf, IntPtr hdc)
在 System.Drawing.Font.FromHfont(IntPtr hfont)
在 System.Drawing.SystemFonts.get_DefaultFont()
在 System.Windows.Forms.Control.get_DefaultFont()
在 System.Windows.Forms.Control.get_Font()
在 System.Windows.Forms.Control.get_FontHeight()
在 System.Windows.Forms.TextBoxBase.get_PreferredHeight()
在 System.Windows.Forms.TextBoxBase.get_DefaultSize()
在 System.Windows.Forms.Control..ctor(Boolean autoInstallSyncContext)
在 System.Windows.Forms.TextBoxBase..ctor()
在 System.Windows.Forms.ThreadExceptionDialog..ctor(Exception t)
在 System.Windows.Forms.Application.ThreadContext.OnThreadException(Exception t)
在 System.Windows.Forms.NotifyIcon.NotifyIconNativeWindow.OnThreadException(Exception e)
在 System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
ExternalException: GDI+ 中发生一般性错误。
--ErrorCode: -2147467259
StackTrace:
在 System.Drawing.SafeNativeMethods.Gdip.Initialize()