解决程序运行异常: set_Interval(Int32 value):值"0"不是Interval的有效值
使用360优化了一下系统(windows XP sp3),然后在运行一个程序时,一旦使用右键菜单就报错,错误信息如下,
******************************** Started ********************************
ScriptEditor.exe Error: 2 : Exception:
System.ArgumentOutOfRangeException: Value '0' is not a valid value for Interval. Interval must be greater than 0.
Parameter name: Interval
at System.Windows.Forms.Timer.set_Interval(Int32 value)
at bc.g()
at bc.l()
at ActiproSoftware.UIStudio.Bar.BarCommandLink.OnMouseEnter(MouseEventArgs e)
at ActiproSoftware.WinUICore.UIElement.ActiproSoftware.WinUICore.IInputElement.RaiseMouseLeaveEvent(MouseEventArgs e)
at ActiproSoftware.WinUICore.UIElement.a(IUIElement A_0, MouseEventArgs A_1)
at ActiproSoftware.WinUICore.UIElement.OnMouseLeave(MouseEventArgs e)
at ActiproSoftware.WinUICore.UIElement.ActiproSoftware.WinUICore.IInputElement.RaiseMouseLeaveEvent(MouseEventArgs e)
at ActiproSoftware.WinUICore.UIElement.a(IUIElement A_0, MouseEventArgs A_1)
at ActiproSoftware.WinUICore.UIElement.OnMouseLeave(MouseEventArgs e)
at ActiproSoftware.WinUICore.UIElement.ActiproSoftware.WinUICore.IInputElement.RaiseMouseLeaveEvent(MouseEventArgs e)
at ActiproSoftware.WinUICore.UIElement.a(IUIElement A_0, MouseEventArgs A_1)
at ActiproSoftware.WinUICore.UIElement.OnMouseLeave(MouseEventArgs e)
at ActiproSoftware.WinUICore.UIElement.ActiproSoftware.WinUICore.IInputElement.RaiseMouseLeaveEvent(MouseEventArgs e)
at ActiproSoftware.WinUICore.UIControl.a(IUIElement A_0, MouseEventArgs A_1)
at ActiproSoftware.WinUICore.UIControl.OnMouseLeave(EventArgs e)
at ActiproSoftware.UIStudio.Bar.BarDockArea.OnMouseLeave(EventArgs e)
at System.Windows.Forms.Control.WmMouseLeave(Message& m)
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.ScrollableControl.WndProc(Message& m)
at ActiproSoftware.UIStudio.Bar.BarDockArea.WndProc(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.DebuggableCallback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
at System.Windows.Forms.UnsafeNativeMethods.DispatchMessageW(MSG& msg)
at System.Windows.Forms.Application.ComponentManager.System.Windows.Forms.UnsafeNativeMethods.IMsoComponentManager.FPushMessageLoop(Int32 dwComponentID, Int32 reason, Int32 pvLoopData)
at System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(Int32 reason, ApplicationContext context)
at System.Windows.Forms.Application.ThreadContext.RunMessageLoop(Int32 reason, ApplicationContext context)
at System.Windows.Forms.Application.Run(Form mainForm)
at Quest.PowerGUI.ScriptEditor.Program.Main()
ProcessId=4588
ThreadId=1
DateTime=2010-01-27T14:32:43.3631892Z
******************************** Closed ********************************
分析了一下,主要问题在这一句
at System.Windows.Forms.Timer.set_Interval(Int32 value);
提示说0不是interval参数的有效值。
这个错误只在点击右键显示右键菜单时才出现,回忆了一下优化内容,似乎有一项是加快右键菜单显示。猜测是“右键显示延迟”设置的问题。
按如下流程找到注册表中指定项
1) 开始-->运行-->输入“regedit”
2) 找到“HKEY_CURRENT_USER/Control Panel/Desktop/MenuShowDelay”
果然我的这里被修改成了0,将其改为1,退出注册表编辑器,然后重启系统(必须,重启后才能生效)。
果然不出所料,就是这里的问题,现在一切运行正常。有时候,优化真是害死人啊~~哥的一个上午就这么废了。
————————————————
版权声明:本文为CSDN博主「hubo2690」的原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接及本声明。
原文链接:https://blog.csdn.net/hubo2690/article/details/6057670
本文作者:兰purvis
本文链接:https://www.cnblogs.com/purvis/p/15137478.html
版权声明:本作品采用知识共享署名-非商业性使用-禁止演绎 2.5 中国大陆许可协议进行许可。
【推荐】国内首个AI IDE,深度理解中文开发场景,立即下载体验Trae
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步