> ## Documentation Index
> Fetch the complete documentation index at: https://docs.abbyy.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Delete Method of the PopupMenu Object

> Delete method of the PopupMenu Object in ABBYY FineReader Engine Visual Components on Windows — This method removes the specified element from the custom part of the context menu.

This method removes the specified element from the custom part of the context menu.

## Syntax

### C++

```cpp theme={null}
HRESULT Delete( MenuItemEnum CommandId );
```

### C\#

```csharp theme={null}
void Delete( MenuItemEnum CommandId );
```

### Visual Basic .NET

```vb theme={null}
Sub Delete(CommandId As MenuItemEnum)
```

## Parameters

CommandId

\[in] Specifies the element to be removed from the custom part of the context menu as a [MenuItemEnum](/fine-reader/engine/visual-components-reference/enumerations/menuitemenum) constant. See the list of available elements:

* [Image Viewer commands](/fine-reader/engine/visual-components-reference/imageviewer/image-viewer-commands)
* [Zoom Viewer commands](/fine-reader/engine/visual-components-reference/zoomviewer/zoom-viewer-commands)
* [Text Editor commands](/fine-reader/engine/visual-components-reference/texteditor/text-editor-commands)
* [Document Viewer commands](/fine-reader/engine/visual-components-reference/documentviewer/document-viewer-commands)

## Return values

This method has no specific return values. It returns the [standard return values of ABBYY FineReader Engine functions](/fine-reader/engine/api-reference/return-codes).

## Remarks

Before removing a command, make sure that it is in the custom part of the context menu.

## See also

[PopupMenu](/fine-reader/engine/visual-components-reference/supplementary-objects/popupmenu)

[InsertAt](/fine-reader/engine/visual-components-reference/supplementary-objects/popupmenu/insertat-method)
