@Jeff_M, Thank you Jeff. This has certainly pointed me in the right direction.
I've posted the following code for how I've implemented the ContextMenuStrip. I am using this to get the user input rather than using keywords.
Public Class MyCommands
Public mnu As System.Windows.Forms.ContextMenuStrip
Public aDoc As Document = Autodesk.AutoCAD.ApplicationServices.Application.DocumentManager.MdiActiveDocument
Public ed As Editor = aDoc.Editor
Public db As Database = aDoc.Database
<CommandMethod("TestPopupMenu")> _
Public Sub TestPopupMenu()
If mnu Is Nothing Then
mnu = New System.Windows.Forms.ContextMenuStrip
mnu.Items.Add("PlotStyle")
mnu.Items.Add("LineType")
mnu.Items.Add("Color")
mnu.Items.Add("Freeze")
AddHandler mnu.ItemClicked, AddressOf mnu_ItemClicked
End If
mnu.Show(Windows.Forms.Cursor.Position)
End Sub
Private Sub mnu_ItemClicked(ByVal sender As Object, ByVal e As System.Windows.Forms.ToolStripItemClickedEventArgs)
ed.WriteMessage(vbCrLf + e.ClickedItem.ToString)
End Sub
End Class