This isn't that hard, but easy to forget.
For example, lets say you have a picture box, and you have drawn things on it and want the user to be able to have a context menu for when a thing is selected and a different one when not selected. You could assign the picture box the context menu as things are selected / not selected. Or you could do it on the right click show them menu.
I'm showing that second thing here because I find it less error prone when maintaining, just my personal choice.
In either case you'd create a context menu object, fill it in, create the handlers, etc.
if (e.Button == MouseButtons.Right)
{
mPointWhenClicked = new Point(e.X, e.Y);
if (mObjectAlreadySelectedInImage != null)
{
contextMenuWhenSelected.Show(pictureBox1, e.X, e.Y);
}
else
{
contextMenuWhenNotSelected.Show(pictureBox1, e.X, e.Y);
}
}