Home Forums WinForms controls Other WinForms controls Disabling a MenuItem crashes program when shortcut is called

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • User (Old forums)
    Member
    Post count: 23064
    #18572 |

    Hi,

    I have a menu item that is assigned a shortcut. If I programmatically disable the menu item and try the shortcut from I get the following exception:

        at Xceed.SmartUI.SmartItemCollection.OnShortcut(Shortcut shortcut)
       at Xceed.SmartUI.SmartItemCollection.OnShortcut(Shortcut shortcut)
       at Xceed.SmartUI.SmartItemCollection.OnShortcut(Shortcut shortcut)
       at Xceed.SmartUI.Win32.SingletonKeyboardHook.Hook(Int32 code, IntPtr wparam, IntPtr lparam)
       at Xceed.SmartUI.Win32.Win32Hook.IntPtrHookProc(Int32 code, IntPtr wparam, IntPtr lparam)
       at System.Windows.Forms.UnsafeNativeMethods.GetMessageW(MSG& msg, HandleRef hWnd, Int32 uMsgFilterMin, Int32 uMsgFilterMax)
       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 MyApp.Main() in myApp.cs:line 2767

    Is this a known issue?

     

    thanx

    Imported from legacy forums. Posted by kozu (had 1815 views)

    User (Old forums)
    Member
    Post count: 23064

    Hi,

    pasting an exception stack trace is rarely enough to debug a case.  Try debuging using Step-by-Step, perhaps?  Also, it would be helpful to have a little more information; a few lines of code, ideally the few lines right before the exception is being thrown.

    Imported from legacy forums. Posted by Ghislain (had 2192 views)

Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.