Hi I have a problem with vspackage. My Addin is a simple window in which there is a form in which I write some data in text box. If I try to cancel what I wrote ( pressing "BACK" button), it does not work.
How Can I solve this problem?
It seems the same problem : How to handle pressing any keys in the user control in visual studio vspackage
this is the constructor of my command:
private EditMVPCommand(Package package)
{
if (package == null)
{
throw new ArgumentNullException("package");
}
this.package = package;
OleMenuCommandService commandService = this.ServiceProvider.GetService(typeof(IMenuCommandService)) as OleMenuCommandService;
if (commandService != null)
{
var menuCommandID = new CommandID(CommandSet, CommandId);
OleMenuCommand menuItem = new OleMenuCommand(this.MenuItemCallback, menuCommandID);
menuItem.BeforeQueryStatus += new EventHandler(OnBeforeQueryStatus);
commandService.AddCommand(menuItem);
}
}
and this is MenuItemCallBack in which I call the view of my addin :
private void MenuItemCallback(object sender, EventArgs e)
{
MyView.Show();
}
In the textbox of my view all characters work except BACK, ENTER and TAB