A second honeymoon with Microsoft Agent. Do you
remember our article Programming
Microsoft Agent in WinForms and
our sample application PartIt? After you have included your desired agent
in your application, are you feeling bad with the default popup menu? If so,
then you are in the right place (welcome :).)
Enough talking, let's get to work! First,
prepare your code that loads the Microsoft Agent and brings it to the screen.
After that, create your
System.Windows.Forms.ContextMenuStrip and add your required items (well,
including "Hide" maybe) and finish the item event handlers.
Now, let's complete it. Get to the code that
loads the agent character (e.g. calls the Characters.Load() method of the agent
control object, AxAgentObjects.AxAgent) and just disable the AutoPopupMenu
flag/property of the character object, AgentObjects.IAgentCtlCharacterEx. This
flag/property determines whether to allow the default popup menu or not.