You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Yes, System.Windows.Forms.Command in System.Windows.Forms is internal, but we must use it, because Control.WmCommand use it to dispatch WM_COMMAND message.
For example,
var form = new Form();
form.MouseClick +=
(sender, e) =>
new ContextMenu(new[] { new MenuItem("Test", (sender, e) => MessageBox.Show(((MenuItem)sender).Text)) })
.Show((Control)sender, e.Location);
form.Show();
click form, and then click the "Test" menuitem, nothing happen, message box not shown.
System.Windows.Forms.Legacy/System/Windows/Forms/Command.cs
Line 7 in 3500c3a
Should use "System.Windows.Forms.Command" in assembly "System.Windows.Forms".
Simple code:
The text was updated successfully, but these errors were encountered: