BoldSignA modern eSignature application with affordable pricing. Sign up today for unlimited document usage!
Hi,
We have an application that shows a XPMenus.PopupMenu with a UserControl as its parent. The UserControl is COM-enabled and via the HTML <object> tag instantiated on a HTML-page. That is, the usercontrol is NOT added to a Form.
The problem is that the first time the PopupMenu.Show() is called, an exception gets thrown : "Non-static method requires a target".
The Control.FindForm() method might be the problem.
Any suggestions ?
I have included at StackTrace below.
Thanks,
Jimmy
Stack-Trace:
System.Reflection.TargetException: Non-static method requires a target.
at System.Reflection.RuntimeMethodInfo.InternalInvoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture, Boolean isBinderDefault, Assembly caller, Boolean verifyAccess)
at System.Reflection.RuntimeMethodInfo.InternalInvoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture, Boolean verifyAccess)
at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
at Syncfusion.Windows.Forms.Tools.XPMenus.BarManager.FireMenuStart(Form form)
at Syncfusion.Windows.Forms.Tools.XPMenus.BarManager.OnStartingMenuNavigation(Form form)
at Syncfusion.Windows.Forms.Tools.XPMenus.PopupMenu.ShowChildrenUI(Point pos, IPopupParent parentUI)
at Syncfusion.Windows.Forms.Tools.XPMenus.PopupMenu.Show(Control control, Point pos)
at ClassLibrary2.MyControl.MyOnMouseDown(Object sender, MouseEventArgs e) in c:\documents and settings\administrator\my documents\visual studio projects\classlibrary2\classlibrary2\mycontrol.cs:line 29
at System.Windows.Forms.Control.OnMouseDown(MouseEventArgs e)
at System.Windows.Forms.UserControl.OnMouseDown(MouseEventArgs e)
at System.Windows.Forms.Control.WmMouseDown(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.ContainerControl.WndProc(Message& m)
at System.Windows.Forms.UserControl.WndProc(Message& m)
at System.Windows.Forms.ControlNativeWindow.OnMessage(Message& m)
at System.Windows.Forms.ActiveXImpl.System.Windows.Forms.IWindowTarget.OnMessage(Message& m)
at System.Windows.Forms.ActiveXImpl.System.Windows.Forms.IWindowTarget.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)
mscorlib, Assembly Version: 1.0.5000.0, Win32 Version: 1.1.4322.573
----------------------------------------
Syncfusion.Tools, Assembly Version: 1.6.1.5
----------------------------------------
Syncfusion.Shared, Assembly Version: 1.6.1.5