Example #1
0
        private void ConfigContextMenu(Object sender, StatusEventArgs e)
        {
            MyMenu    menu      = new MyMenu(_dgvMain);
            MenuStrip menuStrip = menu.CreateMainMenu();

            this.Controls.Remove(this.MainMenuStrip);
            this.MainMenuStrip = menuStrip;
            this.Controls.Add(menuStrip);

            _dgvCar.ContextMenuStrip = menu.CreateContextMenu();
        }
Example #2
0
        private void ConfigContextMenu(Object sender, StatusEventArgs e)
        {
            MyMenu menu = new MyMenu(_dgvMain);
            MenuStrip menuStrip = menu.CreateMainMenu();

            this.Controls.Remove(this.MainMenuStrip);
            this.MainMenuStrip = menuStrip;
            this.Controls.Add(menuStrip);

            _dgvCar.ContextMenuStrip = menu.CreateContextMenu();
        }