This is what I have done so far:
When the user clicks this menu item all the menu items clear and a password prompt comes up. If the password is correct the menu items are added to the box again.
That works fine but the problem is that after the password is entered correctly, the user would expect the box to be shown, but I cannot figure out how to do that. I tried using PerformClick() but that did nothing at all.
When the user clicks this menu item all the menu items clear and a password prompt comes up. If the password is correct the menu items are added to the box again.
That works fine but the problem is that after the password is entered correctly, the user would expect the box to be shown, but I cannot figure out how to do that. I tried using PerformClick() but that did nothing at all.
Code:
private void RepairMImain_Select(object sender, System.EventArgs e)
{
this.RepairMImain.MenuItems.Clear();
PassForm P=new PassForm();
DialogResult R= P.ShowDialog();
if(R==DialogResult.Yes)
{
this.RepairMImain.MenuItems.AddRange(new System.Windows.Forms.MenuItem[] {
this.RepairMI, this.AboutRepairFilesMI, this.ViewBackupMI, this.AboutBackupMI});
}
}