473,411 Members | 2,059 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,411 software developers and data experts.

Favorites/Registry Help Needed!


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\\WebBro wser",
true);

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

favoritesToolStripMenuItem.DropDownItems.Add(key.G etValue(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
Jul 30 '06 #1
1 1396
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.

Mateusz Rajca wrote:
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\\WebBro wser",
true);

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

favoritesToolStripMenuItem.DropDownItems.Add(key.G etValue(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
Jul 30 '06 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

9
by: shank | last post by:
Is there any one "add to favorites" code that will work for IE, NS, AOL, and a host of others? At least some code that will give me an effective "add to favorites" for the highest percentage of...
5
by: JP | last post by:
I have the need to be able to access the IE5+ favorites menu, read the title and URL for each shortcut so I can render the person's favorites list on a web page. The project I'm working on is...
9
by: Dennis Ruppert | last post by:
Greetings This is rather ambitious: I have a split database that contains many different reports. I have a form that the end user launches the reports from. They select the report criteria...
4
by: Cal | last post by:
The Help examples for creating a Registry subkey uses double backslashes between subkeys. The examples for creating a folder use a single backslash. First: Am I right in that double...
6
by: JOSII | last post by:
Getting a string of boolean value into and out of the registry is no problem. Here's the problem: Although you can place an object into the registry and retreive it, I need to place an ArrayList...
5
by: draken | last post by:
Basically, what I am looking to do is to sync up browsers favorites via a website without a download. I thought of javascript when first doing this, as I know, mozilla would allow me to pull them...
6
by: Killer42 | last post by:
I have actually asked a pretty similar question here in the past, without a great deal of success. But I've decided to try a different tack. So, what are the ways in which a network admin could...
7
by: =?Utf-8?B?TWVs?= | last post by:
I have SP2 of IE 7 and keep losing 2 of my Favorites folders, one called Health and the other called Shopping. I restore them and they eventually disappear again. I have Windows Updates set to...
5
by: andrewq2 | last post by:
I have a post in fourms.micorsoft.com but no one is responding, and i had good luck in google groups befor so i decieded on posting my question here also. Im trying to add a favorites function to...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.