internal void FireShowContextMenu() { Point screenOrigin = Owner.PointToScreen(new Point(0, 0)); Point currentpoint = new System.Drawing.Point(Cursor.Position.X - screenOrigin.X, Cursor.Position.Y - screenOrigin.Y); ShowContextMenu(this.Owner, new ShowContextMenuEventArgs(currentpoint, AppropriateContextMenuType)); if (Owner.UseDefaultContextMenu && Owner.UseCustomContextMenu == false) { if (this.AppropriateContextMenuType == ContextMenuType.Body || AppropriateContextMenuType == ContextMenuType.Button || AppropriateContextMenuType == ContextMenuType.Form) { BodyMenu.Show(Owner, currentpoint); } if (this.AppropriateContextMenuType == ContextMenuType.TextSelected) { SelectedTextMenu.Show(Owner, currentpoint); } if (this.AppropriateContextMenuType == ContextMenuType.ImageAndLink) { LinkOrImageContextMenu.Show(Owner, currentpoint); return; } if (this.AppropriateContextMenuType == ContextMenuType.Image) { ImageContextMenu.Show(Owner, currentpoint); } if (this.AppropriateContextMenuType == ContextMenuType.Link) { LinkContextMenu.Show(Owner, currentpoint); } } }