Favorites/Registry Help Needed!

G

Guest

I am making a web browser in C#. I need help doing the favorites. I got as
far as populating the favorites menu with a list of values from the
"LocalMachine\Software\WebBrowser" key.Now how can I make the browser
navigate to the clicked menu?

Heres what I got for the App to load the list of values:

RegistryKey key = Registry.LocalMachine.OpenSubKey("Software\\WebBrowser",
true);

private static void Form1_Load(object sender, EventArgs e){
RegistryKey RK =
Registry.LocalMachine.OpenSubKey("Software\\WebBrowser");
if(RK != null){
string[] valNames = key.GetValueNames();
foreach (string x in valNames){

favoritesToolStripMenuItem.DropDownItems.Add(key.GetValue(x).ToString(),
Web_Browser.Properties.Resources.window_new, matt_Click);

}
}

else{
RegistryKey key =
Registry.LocalMachine.OpenSubKey("Software", true);
RegistryKey newkey = key.CreateSubKey("WebBrowser");
}
}

private void matt_Click(object sender, EventArgs e)
{
????? WHAT DO I ADD HERE????????????????????
}

Matt
 
P

pigeonrandle

Matt,
Why dont you use the files in the favourites folder of the current user
to fill your menu ... assuming you want to use the same ones as IE.

Then you can read in the file (by the name of the item they clicked)
and get the url - open a 'favourite' in notepad and you should get the
idea.

Cheers,
James.
 

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