This method allows you to remove custom items that were added to the HotDocs library window menus using AddUserMenuItem or AddUserMenuItem2. It uses the handle returned when the menu item was added to determine which menu item to remove.
void DeleteUserMenuItem ( int uiHandle )
Parameters | Description |
uiHandle | This is the handle of the menu item that was returned when the item was created using AddUserMenuItem. |
The following Visual C# example adds a separator bar followed by a menu entry to the File menu in the HotDocs Library interface. Later (usually somewhere else in your code), the item is removed, which leaves the separator bar as the last item in the menu and HotDocs deletes it automatically.
public class ExampleCode { static void Main() { HotDocs.Application app = new HotDocs.Application(); int handle; app.AddUserMenuItem("-", HotDocs.HDLIMENU.LI_FILE); handle = app.AddUserMenuItem("User Menu Entry #1", HotDocs.HDLIMENU.LI_FILE); // Somewhere else in the program... app.DeleteUserMenuItem(handle); } }
Separator bars added using the AddUserMenuItem or AddUserMenuItem2 method do not have valid handles, which means they cannot be removed using this method. However, if other items are removed and a separator bar becomes the last entry in a menu, it is removed automatically.