You don't need to do that in.Net.
Add a ContextMenuStrip component to your form and set the ContextMenuStrip property of the textbox to that component.
Then handle the Opening event for the ContextMenuStrip to decide which menus you want to show.
You cannot add the popup menu to list box via SolidWorks API. However you have several workarounds:
- Create a context menu using the Windows API and show the menu in OnListboxRMBUp handler: http://msdn.microsoft.com/en-us/library/windows/desktop/ms647626(v=vs.85).aspx
- Similar to point #1 but instead of WinAPI create a custom borderless form which looks like and Context Menu
- Create custom ListBox using the Windows Forms and insert it to property page as an ActiveX control IPropertyManagerPageActiveX
Regards, Artem Taturevych | Snr. Developer | IC3D ANZ
IC3DSteel – New Steel Solution for SolidWorks
translationXpert – SolidWorks files language translator
Great thanks Simon and Artem for the response! I will try it!