C#类型& amp;#39; System.ArgumentException& amp;#39;未处理的例外;发生在System.Drawing.dll中的附加信息:参数无效。 [英] C# An unhandled exception of type 'System.ArgumentException' occurred in System.Drawing.dll Additional information: Parameter is not valid.

查看:101
本文介绍了C#类型& amp;#39; System.ArgumentException& amp;#39;未处理的例外;发生在System.Drawing.dll中的附加信息:参数无效。的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您好,我遇到了很多麻烦这个错误。当我运行我的应用程序并悬停或单击按钮时,它会给我这个错误。我不确定如何解决它。这里< g class =" gr_ gr_267 gr-alert gr_gramm样式multiReplace"
data-gr-id =" 267" id =" 267">是  my< / g>代码和输出。

Hello, I'm having a lot of trouble with this error. When I run my application and either hover or click on a button it will give me this error. I'm not sure how to fix it. Here <g class="gr_ gr_267 gr-alert gr_gramm Style multiReplace" data-gr-id="267" id="267">are  my</g> code and Output.




输出:

'登录毒蛇Safe.vshost.exe'(CLR v4.0.30319:Login Viper Safe.vshost.exe):已加载'C:\ WINDOWS \ Microsoft \\ net\assembly\GAC_32 \\ ndc \\ n \\ r \\ n \\ r \\ t \\ ID + \\ v4.0_4.0.0。 0__b77a5c561934e089\mscorlib.dll"。跳过加载符号。模块已经过优化,调试器选项'Just
My Code'已启用。

'登录Viper Safe.vshost.exe'(CLR v4.0.30319:Login Viper Safe.vshost.exe) :已加载'C:\ WINDOWS \assembly\GAC_MSIL \ Microsoft.VisualStudio.HostingProcess.Utilities\12.0.0.0__b03f5f7f11d50a3a \ Microsoft.VisualStudio.HostingProcess.Utilities.dll'。跳过加载
符号。模块已优化,调试器选项"Just My Code"已启用。

'登录Viper Safe.vshost.exe'(CLR v4.0.30319:Login Viper Safe.vshost.exe):已加载'C :\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\System.Windows.Forms\v4.0_4.0.0.0__b77a5c561934e089\System.Windows.Forms.dll"。跳过加载符号。模块已经过优化,
调试器选项'Just My Code'已启用。

'登录Viper Safe.vshost.exe'(CLR v4.0.30319:Login Viper Safe.vshost.exe) :已加载'C:\ WINDOWS \ Microsoft.Net \assembly\GAC_MSIL \ System \ v4.0_4.0.0.0__b77a5c561934e089 \ System.dll'。跳过加载符号。模块已经过优化,调试器选项'Just My
Code'已启用。

'登录Viper Safe.vshost.exe'(CLR v4.0.30319:Login Viper Safe.vshost.exe) :已加载'C:\ WINDOWS \ Microsoft.Net\assembly\GAC_MSIL \System.Drawing \v4.0_4.0.0.0__b03f5f7f11d50a3a \ System.Drawing.dll'。跳过加载符号。模块已经过优化,调试器
选项'Just My Code'已启用。

'登录Viper Safe.vshost.exe'(CLR v4.0.30319:Login Viper Safe.vshost.exe) :已加载'C:\ WINDOWS \assembly\GAC_MSIL \ Microsoft.VisualStudio.HostingProcess.Utilities.Sync\12.0.0.0__b03f5f7f11d50a3a \ Microsoft.VisualStudio.HostingProcess.Utilities.Sync.dll'。跳过
加载符号。模块已优化,调试器选项"Just My Code"已启用。

'登录Viper Safe.vshost.exe'(CLR v4.0.30319:Login Viper Safe.vshost.exe):已加载'C :\WINDOWS\assembly\GAC_MSIL\Microsoft.VisualStudio.Debugger.Runtime\12.0.0.0__b03f5f7f11d50a3a\Microsoft.VisualStudio.Debugger.Runtime.dll"。跳过加载符号。模块
已经过优化,调试器选项'Just My Code'已启用。

'登录Viper Safe.vshost.exe'(CLR v4.0.30319:Login Viper Safe.vshost.exe) :已加载'C:\ Users \SillyTen9 \documents\visual studio 2013 \Projects\Login Viper Safe \Login Viper Safe \bin\Debug\Login Viper Safe.vshost.exe'。跳过加载符号。模块优化
并启用调试器选项'Just My Code'。

'登录Viper Safe.vshost.exe'(CLR v4.0.30319:Login Viper Safe.vshost.exe) :已加载'C:\ WINDOWS \ Microsoft.Net\assembly\GAC_MSIL \ System.Core \ v4.0_4.0.0.0__b77a5c561934e089 \ System.Core.dll'。跳过加载符号。模块已经过优化,调试器选项
'Just My Code'已启用。

'登录Viper Safe.vshost.exe'(CLR v4.0.30319:登录Viper Safe.vshost.exe) :已加载'C:\ WINDOWS \ Microsoft.Net \assembly\GAC_MSIL \ System.Management \v4.0_4.0.0.0__b03f5f7f11d50a3a \ System.Management.dll'。跳过加载符号。模块已经过优化,调试器
选项'Just My Code'已启用。

'登录Viper Safe.vshost.exe'(CLR v4.0.30319:Login Viper Safe.vshost.exe) :已加载'C:\ WINDOWS \ MicroSoft \\ .assembly \ GAC_MSIL \ System.Xml.Linq \ v4.0_4.0.0.0__b77a5c561934e089 \ System.Xml.Linq.dll'。跳过加载符号。模块已经过优化,调试器
选项'Just My Code'已启用。

'登录Viper Safe.vshost.exe'(CLR v4.0.30319:Login Viper Safe.vshost.exe) :已加载'C:\ WINDOWS \ Microsoft.Net\assembly\GAC_MSIL \ System.Data.DataSetExtensions \v4.0_4.0.0.0__b77a5c561934e089\System.Data.DataSetExtensions.dll'。跳过加载符号。模块
已经过优化,调试器选项'Just My Code'已启用。

'登录Viper Safe.vshost.exe'(CLR v4.0.30319:Login Viper Safe.vshost.exe) :已加载'C:\ WINDOWS \ MicroSoft \\ .assembly \ GAC_MSIL \ Microsoft.CSharp\v4.0_4.0.0.0__b03f5f7f11d50a3a\Microsoft.CSharp.dll'。跳过加载符号。模块已经过优化,调试器
选项'Just My Code'已启用。

'登录Viper Safe.vshost.exe'(CLR v4.0.30319:Login Viper Safe.vshost.exe) :已加载'C:\ WINDOWS \ Microsoft.Net \assembly\GAC_32\System.Data \v4.0_4.0.0.0__b77a5c561934e089 \ System.Data.dll'。跳过加载符号。模块已经过优化,调试器选项'Just
My Code'已启用。

'登录Viper Safe.vshost.exe'(CLR v4.0.30319:Login Viper Safe.vshost.exe) :已加载'C:\ WINDOWS \ Microsoft.Net\assembly\GAC_MSIL \System.Deployment\v4.0_4.0.0.0__b03f5f7f11d50a3a\System.Deployment.dll'。跳过加载符号。模块已经过优化,调试器
选项'Just My Code'已启用。

'登录Viper Safe.vshost.exe'(CLR v4.0.30319:Login Viper Safe.vshost.exe) :已加载'C:\ WINDOWS \ Microsoft.Net \assembly\GAC_MSIL \System.Xml \v4.0_4.0.0.0__b77a5c561934e089 \ System.Xml.dll'。跳过加载符号。模块已经过优化,调试器选项'Just
My Code'已启用。

线程0x2fc7c已退出,代码为259(0x103)。

线程0x2da00已退出代码259(0x103)。
$
'登录Viper Safe.vshost.exe'(CLR v4.0.30319:登录Viper Safe.vshost.exe):已加载'C:\Users \ SillyTen9 \documents\visual studio 2013 \Projects\Login Viper Safe \Login Viper Safe\bin\Debug\Login Viper Safe.exe'。已加载符号。

'登录Viper Safe.vshost.exe'(CLR v4.0.30319:登录Viper Safe.vshost.exe):已加载'C:\Users \SillyTen9 \documents \ visual studio 2013 \Projects\Login Viper Safe \Login Viper Safe\bin\Debug\Bunifu_UI_v1.52.dll'。无法找到或打开PDB文件。

'登录Viper Safe.vshost.exe'(CLR v4.0.30319:登录Viper Safe.vshost.exe):已加载'Bunifu_UI_v1.52&'。模块是在没有符号的情况下构建的。

'登录Viper Safe.vshost.exe'(CLR v4.0.30319:登录Viper Safe.vshost.exe):已加载'C:\ WINDOWS \ Microsoft.Net \assembly\GAC_MSIL\System.Configuration\v4.0_4.0.0.0__b03f5f7f11d50a3a\System.Configuration.dll"。跳过加载符号。模块已经过优化,
调试器选项'Just My Code'已启用。

'登录Viper Safe.vshost.exe'(CLR v4.0.30319:Login Viper Safe.vshost.exe) :已加载'C:\ WINDOWS \ Microsoft.Net\assembly\GAC_32\System.Transactions\v4.0_4.0.0.0__b77a5c561934e089\System.Transactions.dll'。跳过加载符号。模块已经过优化,调试器
选项'Just My Code'已启用。

'登录Viper Safe.vshost.exe'(CLR v4.0.30319:Login Viper Safe.vshost.exe) :已加载'C:\ WINDOWS \ Microsoft.Net\assembly\GAC_32\System.EnterpriseServices\v4.0_4.0.0.0__b03f5f7f11d50a3a\System.EnterpriseServices.dll'。跳过加载符号。模块优化
并启用调试器选项'Just My Code'。

'登录Viper Safe.vshost.exe'(CLR v4.0.30319:Login Viper Safe.vshost.exe) :已加载'C:\ WINDOWS \ Microsoft.Net\assembly\GAC_32\System.EnterpriseServices\v4.0_4.0.0.0__b03f5f7f11d50a3a\System.EnterpriseServices.Wrapper.dll'。跳过加载符号。模块是
优化并启用调试器选项'Just My Code'。

System.Transactions Critical:0:< TraceRecord xmlns =" http://schemas.microsoft.com / 2004/10 / E2ETraceEvent / TraceRecord"严重性="严重">< TraceIdentifier> http://msdn.microsoft.com/TraceCodes/System/ActivityTracing/2004/07/Reliability/Exception/Unhandled< / TraceIdentifier><说明>未处理的
例外< /描述>< AppDomain>登录Viper Safe.vshost.exe< / AppDomain>< Exception>< ExceptionType> System.ArgumentException,mscorlib,Version = 4.0.0.0,Culture = neutral,PublicKeyToken = b77a5c561934e089< / ExceptionType> ;<消息>参数
无效。< / Message>< StackTrace> &NBSP;在System.Drawing.Drawing2D.GraphicsPath.AddArc(Int32 x,Int32 y,Int32 width,Int32 height,Single startAngle,Single sweepAngle)

  &NBSP;在Bunifu.Framework.UI.BunifuThinButton2.c35d2a788b66321162673f341506ea6f8(图形c40e69c93062719bf4a8bb707c4d70e20,矩形ca81478b837e3fd4159c6a01f7e59b46a,的Int32 cf6004e580e7d58e63442fa9f6ccbe96c,笔c9ecbc787210e85fcc000895878b075f7,
颜色c122cc1be7844579ea35a8e7bb4d000bd)

&NBSP;   at Bunifu.Framework.UI.BunifuThinButton2.Refresh()

    at Bunifu.Framework.UI.BunifuThinButton2.c39eabc0cfb3a957053ef69c316908fb0(Object c1de11ede54b55a91240ac3b9926ac670,EventArgs cdd39ed5f7e629ab12aa220afe0f969c6)

    at Bunifu.Framework.UI.BunifuThinButton2.ca6b8a69dbda2be3eff39238f6be70b50(Object c1de11ede54b55a91240ac3b9926ac670,EventArgs cdd39ed5f7e629ab12aa220afe0f969c6)

    at System.Windows.Forms.Control.OnMouseEnter(EventArgs e)

    at System.Windows.Forms.Label.OnMouseEnter(EventArgs e)

    at System.Windows.Forms.Control.WndProc(Message& amp; amp; m)

    at System.Windows.Forms.Label.WndProc(Message& amp; m)

    at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& amp; amp; m)

    at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& amp; amp; m)

   在System.Windows.Forms.NativeWindow.DebuggableCallback(IntPtr hWnd,Int32 msg,IntPtr wparam,IntPtr lparam)< / StackTrace>< ExceptionString> System.ArgumentException:参数无效。

    at System.Drawing.Drawing2D.GraphicsPath.AddArc(Int32 x,Int32 y,Int32 width,Int32 height,Single startAngle,Single sweepAngle)

  &NBSP;在Bunifu.Framework.UI.BunifuThinButton2.c35d2a788b66321162673f341506ea6f8(图形c40e69c93062719bf4a8bb707c4d70e20,矩形ca81478b837e3fd4159c6a01f7e59b46a,的Int32 cf6004e580e7d58e63442fa9f6ccbe96c,笔c9ecbc787210e85fcc000895878b075f7,
颜色c122cc1be7844579ea35a8e7bb4d000bd)

&NBSP;   at Bunifu.Framework.UI.BunifuThinButton2.Refresh()

    at Bunifu.Framework.UI.BunifuThinButton2.c39eabc0cfb3a957053ef69c316908fb0(Object c1de11ede54b55a91240ac3b9926ac670,EventArgs cdd39ed5f7e629ab12aa220afe0f969c6)

    at Bunifu.Framework.UI.BunifuThinButton2.ca6b8a69dbda2be3eff39238f6be70b50(Object c1de11ede54b55a91240ac3b9926ac670,EventArgs cdd39ed5f7e629ab12aa220afe0f969c6)

    at System.Windows.Forms.Control.OnMouseEnter(EventArgs e)

    at System.Windows.Forms.Label.OnMouseEnter(EventArgs e)

    at System.Windows.Forms.Control.WndProc(Message& amp; amp; m)

    at System.Windows.Forms.Label.WndProc(Message& amp; m)

    at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& amp; amp; m)

    at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& amp; amp; m)

    at System.Windows.Forms.NativeWindow.DebuggableCallback(IntPtr hWnd,Int32 msg,IntPtr wparam,IntPtr lparam)< / ExceptionString>< / Exception>< / TraceRecord>

未处理System.Drawing.dll中发生'System.ArgumentException'类型的异常

附加信息:参数无效。



程序' [194160]登录Viper Safe.vshost.exe'已退出,代码为-1(0xffffffff)。

'Login Viper Safe.vshost.exe' (CLR v4.0.30319: Login Viper Safe.vshost.exe): Loaded 'C:\WINDOWS\Microsoft.Net\assembly\GAC_32\mscorlib\v4.0_4.0.0.0__b77a5c561934e089\mscorlib.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'Login Viper Safe.vshost.exe' (CLR v4.0.30319: Login Viper Safe.vshost.exe): Loaded 'C:\WINDOWS\assembly\GAC_MSIL\Microsoft.VisualStudio.HostingProcess.Utilities\12.0.0.0__b03f5f7f11d50a3a\Microsoft.VisualStudio.HostingProcess.Utilities.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'Login Viper Safe.vshost.exe' (CLR v4.0.30319: Login Viper Safe.vshost.exe): Loaded 'C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\System.Windows.Forms\v4.0_4.0.0.0__b77a5c561934e089\System.Windows.Forms.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'Login Viper Safe.vshost.exe' (CLR v4.0.30319: Login Viper Safe.vshost.exe): Loaded 'C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\System\v4.0_4.0.0.0__b77a5c561934e089\System.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'Login Viper Safe.vshost.exe' (CLR v4.0.30319: Login Viper Safe.vshost.exe): Loaded 'C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\System.Drawing\v4.0_4.0.0.0__b03f5f7f11d50a3a\System.Drawing.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'Login Viper Safe.vshost.exe' (CLR v4.0.30319: Login Viper Safe.vshost.exe): Loaded 'C:\WINDOWS\assembly\GAC_MSIL\Microsoft.VisualStudio.HostingProcess.Utilities.Sync\12.0.0.0__b03f5f7f11d50a3a\Microsoft.VisualStudio.HostingProcess.Utilities.Sync.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'Login Viper Safe.vshost.exe' (CLR v4.0.30319: Login Viper Safe.vshost.exe): Loaded 'C:\WINDOWS\assembly\GAC_MSIL\Microsoft.VisualStudio.Debugger.Runtime\12.0.0.0__b03f5f7f11d50a3a\Microsoft.VisualStudio.Debugger.Runtime.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'Login Viper Safe.vshost.exe' (CLR v4.0.30319: Login Viper Safe.vshost.exe): Loaded 'C:\Users\SillyTen9\documents\visual studio 2013\Projects\Login Viper Safe\Login Viper Safe\bin\Debug\Login Viper Safe.vshost.exe'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'Login Viper Safe.vshost.exe' (CLR v4.0.30319: Login Viper Safe.vshost.exe): Loaded 'C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\System.Core\v4.0_4.0.0.0__b77a5c561934e089\System.Core.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'Login Viper Safe.vshost.exe' (CLR v4.0.30319: Login Viper Safe.vshost.exe): Loaded 'C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\System.Management\v4.0_4.0.0.0__b03f5f7f11d50a3a\System.Management.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'Login Viper Safe.vshost.exe' (CLR v4.0.30319: Login Viper Safe.vshost.exe): Loaded 'C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\System.Xml.Linq\v4.0_4.0.0.0__b77a5c561934e089\System.Xml.Linq.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'Login Viper Safe.vshost.exe' (CLR v4.0.30319: Login Viper Safe.vshost.exe): Loaded 'C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\System.Data.DataSetExtensions\v4.0_4.0.0.0__b77a5c561934e089\System.Data.DataSetExtensions.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'Login Viper Safe.vshost.exe' (CLR v4.0.30319: Login Viper Safe.vshost.exe): Loaded 'C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\Microsoft.CSharp\v4.0_4.0.0.0__b03f5f7f11d50a3a\Microsoft.CSharp.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'Login Viper Safe.vshost.exe' (CLR v4.0.30319: Login Viper Safe.vshost.exe): Loaded 'C:\WINDOWS\Microsoft.Net\assembly\GAC_32\System.Data\v4.0_4.0.0.0__b77a5c561934e089\System.Data.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'Login Viper Safe.vshost.exe' (CLR v4.0.30319: Login Viper Safe.vshost.exe): Loaded 'C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\System.Deployment\v4.0_4.0.0.0__b03f5f7f11d50a3a\System.Deployment.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'Login Viper Safe.vshost.exe' (CLR v4.0.30319: Login Viper Safe.vshost.exe): Loaded 'C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\System.Xml\v4.0_4.0.0.0__b77a5c561934e089\System.Xml.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
The thread 0x2fc7c has exited with code 259 (0x103).
The thread 0x2da00 has exited with code 259 (0x103).
'Login Viper Safe.vshost.exe' (CLR v4.0.30319: Login Viper Safe.vshost.exe): Loaded 'C:\Users\SillyTen9\documents\visual studio 2013\Projects\Login Viper Safe\Login Viper Safe\bin\Debug\Login Viper Safe.exe'. Symbols loaded.
'Login Viper Safe.vshost.exe' (CLR v4.0.30319: Login Viper Safe.vshost.exe): Loaded 'C:\Users\SillyTen9\documents\visual studio 2013\Projects\Login Viper Safe\Login Viper Safe\bin\Debug\Bunifu_UI_v1.52.dll'. Cannot find or open the PDB file.
'Login Viper Safe.vshost.exe' (CLR v4.0.30319: Login Viper Safe.vshost.exe): Loaded 'Bunifu_UI_v1.52&'. Module was built without symbols.
'Login Viper Safe.vshost.exe' (CLR v4.0.30319: Login Viper Safe.vshost.exe): Loaded 'C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\System.Configuration\v4.0_4.0.0.0__b03f5f7f11d50a3a\System.Configuration.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'Login Viper Safe.vshost.exe' (CLR v4.0.30319: Login Viper Safe.vshost.exe): Loaded 'C:\WINDOWS\Microsoft.Net\assembly\GAC_32\System.Transactions\v4.0_4.0.0.0__b77a5c561934e089\System.Transactions.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'Login Viper Safe.vshost.exe' (CLR v4.0.30319: Login Viper Safe.vshost.exe): Loaded 'C:\WINDOWS\Microsoft.Net\assembly\GAC_32\System.EnterpriseServices\v4.0_4.0.0.0__b03f5f7f11d50a3a\System.EnterpriseServices.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'Login Viper Safe.vshost.exe' (CLR v4.0.30319: Login Viper Safe.vshost.exe): Loaded 'C:\WINDOWS\Microsoft.Net\assembly\GAC_32\System.EnterpriseServices\v4.0_4.0.0.0__b03f5f7f11d50a3a\System.EnterpriseServices.Wrapper.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
System.Transactions Critical: 0 : <TraceRecord xmlns="http://schemas.microsoft.com/2004/10/E2ETraceEvent/TraceRecord" Severity="Critical"><TraceIdentifier>http://msdn.microsoft.com/TraceCodes/System/ActivityTracing/2004/07/Reliability/Exception/Unhandled</TraceIdentifier><Description>Unhandled exception</Description><AppDomain>Login Viper Safe.vshost.exe</AppDomain><Exception><ExceptionType>System.ArgumentException, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</ExceptionType><Message>Parameter is not valid.</Message><StackTrace>   at System.Drawing.Drawing2D.GraphicsPath.AddArc(Int32 x, Int32 y, Int32 width, Int32 height, Single startAngle, Single sweepAngle)
   at Bunifu.Framework.UI.BunifuThinButton2.c35d2a788b66321162673f341506ea6f8(Graphics c40e69c93062719bf4a8bb707c4d70e20, Rectangle ca81478b837e3fd4159c6a01f7e59b46a, Int32 cf6004e580e7d58e63442fa9f6ccbe96c, Pen c9ecbc787210e85fcc000895878b075f7, Color c122cc1be7844579ea35a8e7bb4d000bd)
   at Bunifu.Framework.UI.BunifuThinButton2.Refresh()
   at Bunifu.Framework.UI.BunifuThinButton2.c39eabc0cfb3a957053ef69c316908fb0(Object c1de11ede54b55a91240ac3b9926ac670, EventArgs cdd39ed5f7e629ab12aa220afe0f969c6)
   at Bunifu.Framework.UI.BunifuThinButton2.ca6b8a69dbda2be3eff39238f6be70b50(Object c1de11ede54b55a91240ac3b9926ac670, EventArgs cdd39ed5f7e629ab12aa220afe0f969c6)
   at System.Windows.Forms.Control.OnMouseEnter(EventArgs e)
   at System.Windows.Forms.Label.OnMouseEnter(EventArgs e)
   at System.Windows.Forms.Control.WndProc(Message&amp;amp; m)
   at System.Windows.Forms.Label.WndProc(Message&amp;amp; m)
   at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message&amp;amp; m)
   at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message&amp;amp; m)
   at System.Windows.Forms.NativeWindow.DebuggableCallback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)</StackTrace><ExceptionString>System.ArgumentException: Parameter is not valid.
   at System.Drawing.Drawing2D.GraphicsPath.AddArc(Int32 x, Int32 y, Int32 width, Int32 height, Single startAngle, Single sweepAngle)
   at Bunifu.Framework.UI.BunifuThinButton2.c35d2a788b66321162673f341506ea6f8(Graphics c40e69c93062719bf4a8bb707c4d70e20, Rectangle ca81478b837e3fd4159c6a01f7e59b46a, Int32 cf6004e580e7d58e63442fa9f6ccbe96c, Pen c9ecbc787210e85fcc000895878b075f7, Color c122cc1be7844579ea35a8e7bb4d000bd)
   at Bunifu.Framework.UI.BunifuThinButton2.Refresh()
   at Bunifu.Framework.UI.BunifuThinButton2.c39eabc0cfb3a957053ef69c316908fb0(Object c1de11ede54b55a91240ac3b9926ac670, EventArgs cdd39ed5f7e629ab12aa220afe0f969c6)
   at Bunifu.Framework.UI.BunifuThinButton2.ca6b8a69dbda2be3eff39238f6be70b50(Object c1de11ede54b55a91240ac3b9926ac670, EventArgs cdd39ed5f7e629ab12aa220afe0f969c6)
   at System.Windows.Forms.Control.OnMouseEnter(EventArgs e)
   at System.Windows.Forms.Label.OnMouseEnter(EventArgs e)
   at System.Windows.Forms.Control.WndProc(Message&amp;amp; m)
   at System.Windows.Forms.Label.WndProc(Message&amp;amp; m)
   at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message&amp;amp; m)
   at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message&amp;amp; m)
   at System.Windows.Forms.NativeWindow.DebuggableCallback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)</ExceptionString></Exception></TraceRecord>
An unhandled exception of type 'System.ArgumentException' occurred in System.Drawing.dll
Additional information: Parameter is not valid.

The program '[194160] Login Viper Safe.vshost.exe' has exited with code -1 (0xffffffff).

代码:

使用System;

使用System.Collections.Generic;

使用System.ComponentModel;

使用System.Data;

使用System。绘图;

使用System.Linq;

使用System.Text;

使用System.Threading.Tasks;

使用System.Windows.Forms;

使用System.Data.OleDb;
$
命名空间Login_Viper_Safe

{

&NBSP; &NBSP; public partial class< g class =" gr_ gr_221 gr-alert gr_gramm gr_run_anim Style multiReplace"数据-GR-ID =" 221" id =" 221"> login:< / g>表格

  &NBSP; {

  &NBSP; &NBSP; &NBSP; private OleDbConnection connection = new OleDbConnection();

  &NBSP; &NBSP; &NBSP;公共登录()

  &NBSP; &NBSP; &NBSP; {

  &NBSP; &NBSP; &NBSP; &NBSP; &NBSP; InitializeComponent();

  &NBSP; &NBSP; &NBSP; }

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using System.Data.OleDb;
namespace Login_Viper_Safe
{
    public partial class <g class="gr_ gr_221 gr-alert gr_gramm gr_run_anim Style multiReplace" data-gr-id="221" id="221">login :</g> Form
    {
        private OleDbConnection connection = new OleDbConnection();
        public login()
        {
            InitializeComponent();
        }

  &NBSP; &NBSP; &NBSP; private void bunifuThinButton21_Click(object sender,EventArgs e)

  &NBSP; &NBSP; &NBSP; {

  &NBSP; &NBSP; &NBSP; &NBSP; &NBSP; this.Hide();

  &NBSP; &NBSP; &NBSP; &NBSP; &NBSP;注册f3 =新注册();

  &NBSP; &NBSP; &NBSP; &NBSP; &NBSP; f3.ShowDialog();

  &NBSP; &NBSP; &NBSP; }


  &NBSP; &NBSP; &NBSP; private void bunifuThinButton22_Click_2(对象发件人,EventArgs e)

  &NBSP; &NBSP; &NBSP; {

  &NBSP; &NBSP; &NBSP; &NBSP; &NBSP; SlideA.Location = slideB.Location;

  &NBSP; &NBSP; &NBSP; &NBSP; &NBSP; bunifuSeparator1.Left = bunifuThinButton21.Left;

  &NBSP; &NBSP; &NBSP; &NBSP; &NBSP; bunifuSeparator1.Width = bunifuThinButton21.Width;

  &NBSP; &NBSP; &NBSP; }


  &NBSP; &NBSP; &NBSP; private void bunifuThinButton21_Click_2(object sender,EventArgs e)

  &NBSP; &NBSP; &NBSP; {

  &NBSP; &NBSP; &NBSP; &NBSP; &NBSP; slideB.Location = SlideA.Location;

  &NBSP; &NBSP; &NBSP; &NBSP; &NBSP; bunifuSeparator1.Left = bunifuThinButton22.Left;

  &NBSP; &NBSP; &NBSP; &NBSP; &NBSP; bunifuSeparator1.Width = bunifuThinButton22.Width;

  &NBSP; &NBSP; &NBSP; }


  &NBSP; }
}

        private void bunifuThinButton21_Click(object sender, EventArgs e)
        {
            this.Hide();
            Signup f3 = new Signup();
            f3.ShowDialog();
        }

        private void bunifuThinButton22_Click_2(object sender, EventArgs e)
        {
            SlideA.Location = slideB.Location;
            bunifuSeparator1.Left = bunifuThinButton21.Left;
            bunifuSeparator1.Width = bunifuThinButton21.Width;
        }

        private void bunifuThinButton21_Click_2(object sender, EventArgs e)
        {
            slideB.Location = SlideA.Location;
            bunifuSeparator1.Left = bunifuThinButton22.Left;
            bunifuSeparator1.Width = bunifuThinButton22.Width;
        }

    }
}







:)

推荐答案

将参数传递给方法且参数无效时,会发生您发布的异常。如果没有任何信息,例如被调用的方法,传递的参数等,我们就没有多大用处。

The exception you posted occurs when you pass an argument to a method and the argument is invalid. Without any information such as the method being called, the argument being passed, etc we aren't going to be of much use.

查看调用堆栈时按钮发生异常正在刷新。但刷新的按钮是一个自定义按钮。不知道那种方法是什么,我们无法帮助。我要打赌,当
试图重绘自己并假设是假的时候,按钮正在做出假设。它可能是一个简单的事情,因为按钮尚未创建,它正在使用的图形对象无效或正在计算无效的宽度/高度值。我的
钱在宽度/高度计算上是错误的。逐步执行该方法并调试问题。如果你在调试器中运行,那么当异常发生时,它会让你进入相关的行。如果您没有调试程序,请使用F5
来执行此操作。

Looking at the call stack the exception is occurring when a button is being refreshed. But the button being refreshed is a custom button. Without knowing what that method does we cannot help. I'm going to wager that the button is making an assumption when it is attempting to redraw itself and that assumption is false. It might be something as simple as the fact that the button hasn't been created yet, the graphics object it is using is not valid or it is calculating a width/height value that is not valid. My money is on a width/height calculation that is wrong. Step through that method and debug the issue. If you're running in the debugger then when the exception occurs it'll throw you onto the line in question. If you aren't debugging your program then use F5 to do so.

Michael Taylor

http://www.michaeltaylorp3.net

Michael Taylor
http://www.michaeltaylorp3.net


这篇关于C#类型&amp; amp;#39; System.ArgumentException&amp; amp;#39;未处理的例外;发生在System.Drawing.dll中的附加信息:参数无效。的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆