Auto-Hide mode/Error: ContextMenu cannot be shown...

Docking/MDI for Windows Forms Forum

Posted 18 years ago by Seppo Muhonen
Avatar
The following error occurs when I right mouse click the tool window in the "Auto-Hide" mode. This happens only in the older (slower) PCs. What I should do?

System.ArgumentException: ContextMenu cannot be shown on an invisible control.
Parameter name: control
at System.Windows.Forms.ContextMenu.Show(Control control, Point pos)
at ActiproSoftware.UIStudio.Dock.DockManager.?(TabbedMdiWindow , Rectangle , TabbedMdiWindowContextMenuSource )
at ActiproSoftware.UIStudio.Dock.AutoHideTab.OnMouseUp(MouseEventArgs e)
at ActiproSoftware.WinUICore.UIElement.ActiproSoftware.WinUICore.IInputElement.RaiseMouseUpEvent(MouseEventArgs e)
at ActiproSoftware.WinUICore.UIControl.OnMouseUp(MouseEventArgs e)
at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.ScrollableControl.WndProc(Message& m)
at System.Windows.Forms.ControlNativeWindow.OnMessage(Message& m)
at System.Windows.Forms.ControlNativeWindow.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)

Comments (1)

Posted 18 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar
Hi Seppo,

Yes we just found that as well and have it fixed for the next maintenance release.

In the meantime before that comes out, you might be able to handle the WindowContextMenu event, and if the source is TabbedMdiWindowContextMenuSource.AutoHideContainerTab then set e.Cancel in the event args. That should block the exception from happening until the fix is released.


Actipro Software Support

The latest build of this product (v24.1.0) was released 2 months ago, which was after the last post in this thread.

Add Comment

Please log in to a validated account to post comments.