ContextMenu - populate from xml

M

Marc Jennings

Hi there,

I am trying to write a "useful quicklinks" app that populates a
context menu from the contents of an XML file.

My xml file contains the following information...
<SysTrayLauncher>
<MenuItem>
<itemname>Explore C Drive</itemname>
<itemcommand>explorer.exe</itemcommand>
<itemargs>c:\</itemargs>
</MenuItem>
<MenuItem>
<itemname>Explore D Drive</itemname>
<itemcommand>explorer.exe</itemcommand>
<itemargs>d:\</itemargs>
</MenuItem>
...etc...
</SysTrayLauncher>

itemname is what I want to appear in the menu
itemcommand is the application to be called
itemargs is the string containing arguments to be passed to the
command.

I then have a method that calls Process.Start()...

protected void AppLaunch(string applic, string args)
{
Process.Start(applic, args);
}

<y problem is that I have no idea how to create the menu items on the
ContextMenu, and associate the Handler to them.

If anyone can give me a clue, I'd appreciate it.

TIA
Marc.
 
M

Marc Jennings

Thanks

OT : Why is it that I can never find useful resources like that
myself???

:rolleyes:
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top