We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date
close icon

The PopupMenu menu opening throw exeption

Hello, I am working with PopupMenusManager and PopupMenu (version 3.3). On my form I have grid (GridDataBoundGrid) and panel which have the same PopupMenu (same object). After sequence of right clicks (sometimes 3 sometimes more) on grid and on panel I get exception. Is known problem? Do you have any proposition for resolution? Thanks, Vladimir This is exception. Microsoft.ApplicationBlocks.ExceptionManagement.BaseApplicationException: MMI Unhandled Exception ---> System.NullReferenceException: Object reference not set to an instance of an object. at System.Windows.Forms.NativeWindow.AddWindowToTable(IntPtr handle, NativeWindow window) at System.Windows.Forms.NativeWindow.AssignHandle(IntPtr handle, Boolean assignUniqueID) at System.Windows.Forms.NativeWindow.AssignHandle(IntPtr handle) at Syncfusion.Windows.Forms.Tools.XPMenus.HostFormNativeWindow..ctor(Form form) at Syncfusion.Windows.Forms.Tools.XPMenus.PopupMenu.SubscribeHostedForm() at Syncfusion.Windows.Forms.Tools.XPMenus.PopupMenu.set_HostedForm(Form value) at Syncfusion.Windows.Forms.Tools.XPMenus.PopupMenu.Show(Control control, Point pos) at Syncfusion.Windows.Forms.Tools.XPMenus.PopupMenusManager.OnContextMenu(Control control, Point pt, PopupMenu popupMenu) at Syncfusion.Windows.Forms.Tools.XPMenus.PopupMenusManager.OnContextMenu(Control control, Point pt) at Syncfusion.Windows.Forms.Tools.XPMenus.ContextMenuPlaceHolder.Timer_Tick(Object sender, EventArgs e) at Syncfusion.Windows.Forms.Tools.XPMenus.ContextMenuPlaceHolder.Syncfusion.Windows.Forms.Tools.Design.ICallWndProcListener.CallWndProc(Int32 ncode, IntPtr wparam, IntPtr lparam) at Syncfusion.Windows.Forms.Tools.Design.ThreadHooks.CallWndProcedure(Int32 ncode, IntPtr wparam, IntPtr lparam) at System.Windows.Forms.SafeNativeMethods.TrackPopupMenuEx(HandleRef hmenu, Int32 fuFlags, Int32 x, Int32 y, HandleRef hwnd, TPMPARAMS tpm) at System.Windows.Forms.ContextMenu.Show(Control control, Point pos) at System.Windows.Forms.Control.WmContextMenu(Message& m) at System.Windows.Forms.Control.WndProc(Message& m) at Syncfusion.Windows.Forms.ScrollControl.WndProc(Message& msg) at Syncfusion.Windows.Forms.Grid.GridControlBase.WndProc(Message& msg) at System.Windows.Forms.ControlNativeWindow.OnMessage(Message& m) at System.Windows.Forms.ControlNativeWindow.WndProc(Message& m) at System.Windows.Forms.NativeWindow.DebuggableCallback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam) at System.Windows.Forms.UnsafeNativeMethods.CallWindowProc(IntPtr wndProc, IntPtr hWnd, Int32 msg, IntPtr wParam, IntPtr lParam) at System.Windows.Forms.NativeWindow.DefWndProc(Message& m) at System.Windows.Forms.Control.DefWndProc(Message& m) at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks) at System.Windows.Forms.Control.WndProc(Message& m) at Syncfusion.Windows.Forms.ScrollControl.WmMouseUp(Message& msg) at Syncfusion.Windows.Forms.ScrollControl.WndProc(Message& msg) at Syncfusion.Windows.Forms.Grid.GridControlBase.WndProc(Message& msg) at System.Windows.Forms.ControlNativeWindow.OnMessage(Message& m) at System.Windows.Forms.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.ComponentManager.System.Windows.Forms.UnsafeNativeMethods+IMsoComponentManager.FPushMessageLoop(Int32 dwComponentID, Int32 reason, Int32 pvLoopData) at System.Windows.Forms.ThreadContext.RunMessageLoopInner(Int32 reason, ApplicationContext context) at System.Windows.Forms.ThreadContext.RunMessageLoop(Int32 reason, ApplicationContext context) at System.Windows.Forms.Application.Run(Form mainForm) at Elta.MMI.Main.MainExecuter.Main() in d:\localviews\hmi\main\mainexecuter.cs:line 95

2 Replies

J. J.Nagarajan Syncfusion Team June 13, 2006 01:15 PM UTC

Hi Vladimir, We regret for the inconvenience caused. I have tested this issue in v.3.3.0.0.I am afraid, I was not able to reproduce this issue. I have attached my test sample. DataBoundGrid.zip Could you please check the sample and let me know whether you are able to reproduce the issue in this sample?. It would be helpful if you provide a sample or modify the sample attached to reproduce this issue.It will help us to resolve it as early as possible. Thanks for using Essential Tools. Regards, J.Nagaraj


AD Administrator Syncfusion Team February 23, 2007 08:51 AM UTC



>Hello,
>I am working with PopupMenusManager and PopupMenu (version 3.3).
>On my form I have grid (GridDataBoundGrid) and panel which have the same PopupMenu (same object). After sequence of right clicks (sometimes 3 sometimes more) on grid and on panel I get exception.
>Is known problem?
>Do you have any proposition for resolution?
>Thanks,
> Vladimir
>This is exception.
>
>Microsoft.ApplicationBlocks.ExceptionManagement.BaseApplicationException: MMI Unhandled Exception ---> System.NullReferenceException: Object reference not set to an instance of an object.
> at System.Windows.Forms.NativeWindow.AddWindowToTable(IntPtr handle, NativeWindow window)
> at System.Windows.Forms.NativeWindow.AssignHandle(IntPtr handle, Boolean assignUniqueID)
> at System.Windows.Forms.NativeWindow.AssignHandle(IntPtr handle)
> at Syncfusion.Windows.Forms.Tools.XPMenus.HostFormNativeWindow..ctor(Form form)
> at Syncfusion.Windows.Forms.Tools.XPMenus.PopupMenu.SubscribeHostedForm()
> at Syncfusion.Windows.Forms.Tools.XPMenus.PopupMenu.set_HostedForm(Form value)
> at Syncfusion.Windows.Forms.Tools.XPMenus.PopupMenu.Show(Control control, Point pos)
> at Syncfusion.Windows.Forms.Tools.XPMenus.PopupMenusManager.OnContextMenu(Control control, Point pt, PopupMenu popupMenu)
> at Syncfusion.Windows.Forms.Tools.XPMenus.PopupMenusManager.OnContextMenu(Control control, Point pt)
> at Syncfusion.Windows.Forms.Tools.XPMenus.ContextMenuPlaceHolder.Timer_Tick(Object sender, EventArgs e)
> at Syncfusion.Windows.Forms.Tools.XPMenus.ContextMenuPlaceHolder.Syncfusion.Windows.Forms.Tools.Design.ICallWndProcListener.CallWndProc(Int32 ncode, IntPtr wparam, IntPtr lparam)
> at Syncfusion.Windows.Forms.Tools.Design.ThreadHooks.CallWndProcedure(Int32 ncode, IntPtr wparam, IntPtr lparam)
> at System.Windows.Forms.SafeNativeMethods.TrackPopupMenuEx(HandleRef hmenu, Int32 fuFlags, Int32 x, Int32 y, HandleRef hwnd, TPMPARAMS tpm)
> at System.Windows.Forms.ContextMenu.Show(Control control, Point pos)
> at System.Windows.Forms.Control.WmContextMenu(Message& m)
> at System.Windows.Forms.Control.WndProc(Message& m)
> at Syncfusion.Windows.Forms.ScrollControl.WndProc(Message& msg)
> at Syncfusion.Windows.Forms.Grid.GridControlBase.WndProc(Message& msg)
> at System.Windows.Forms.ControlNativeWindow.OnMessage(Message& m)
> at System.Windows.Forms.ControlNativeWindow.WndProc(Message& m)
> at System.Windows.Forms.NativeWindow.DebuggableCallback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
> at System.Windows.Forms.UnsafeNativeMethods.CallWindowProc(IntPtr wndProc, IntPtr hWnd, Int32 msg, IntPtr wParam, IntPtr lParam)
> at System.Windows.Forms.NativeWindow.DefWndProc(Message& m)
> at System.Windows.Forms.Control.DefWndProc(Message& m)
> at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
> at System.Windows.Forms.Control.WndProc(Message& m)
> at Syncfusion.Windows.Forms.ScrollControl.WmMouseUp(Message& msg)
> at Syncfusion.Windows.Forms.ScrollControl.WndProc(Message& msg)
> at Syncfusion.Windows.Forms.Grid.GridControlBase.WndProc(Message& msg)
> at System.Windows.Forms.ControlNativeWindow.OnMessage(Message& m)
> at System.Windows.Forms.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.ComponentManager.System.Windows.Forms.UnsafeNativeMethods+IMsoComponentManager.FPushMessageLoop(Int32 dwComponentID, Int32 reason, Int32 pvLoopData)
> at System.Windows.Forms.ThreadContext.RunMessageLoopInner(Int32 reason, ApplicationContext context)
> at System.Windows.Forms.ThreadContext.RunMessageLoop(Int32 reason, ApplicationContext context)
> at System.Windows.Forms.Application.Run(Form mainForm)
> at Elta.MMI.Main.MainExecuter.Main() in d:\localviews\hmi\main\mainexecuter.cs:line 95
>
>

Loader.
Live Chat Icon For mobile
Up arrow icon