I want to create a context menu using C# that will display next to the node similar to what happens here in Visual Studio:
You should read and try ContextMenu control of c#. I think it will resolve your problem rather than the technique you used..... Or other than use, myform.showdialog(); with setbounds() methods.
ContextMenu
myform.showdialog();
setbounds()