473,666 Members | 2,039 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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\S oftware\WebBrow ser" 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.LocalM achine.OpenSubK ey("Software\\W ebBrowser",
true);

private static void Form1_Load(obje ct sender, EventArgs e){
RegistryKey RK =
Registry.LocalM achine.OpenSubK ey("Software\\W ebBrowser");
if(RK != null){
string[] valNames = key.GetValueNam es();
foreach (string x in valNames){

favoritesToolSt ripMenuItem.Dro pDownItems.Add( key.GetValue(x) .ToString(),
Web_Browser.Pro perties.Resourc es.window_new, matt_Click);

}
}

else{
RegistryKey key =
Registry.LocalM achine.OpenSubK ey("Software", true);
RegistryKey newkey = key.CreateSubKe y("WebBrowser") ;
}
}

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

Matt
Jul 30 '06 #1
1 1417
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\S oftware\WebBrow ser" 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.LocalM achine.OpenSubK ey("Software\\W ebBrowser",
true);

private static void Form1_Load(obje ct sender, EventArgs e){
RegistryKey RK =
Registry.LocalM achine.OpenSubK ey("Software\\W ebBrowser");
if(RK != null){
string[] valNames = key.GetValueNam es();
foreach (string x in valNames){

favoritesToolSt ripMenuItem.Dro pDownItems.Add( key.GetValue(x) .ToString(),
Web_Browser.Pro perties.Resourc es.window_new, matt_Click);

}
}

else{
RegistryKey key =
Registry.LocalM achine.OpenSubK ey("Software", true);
RegistryKey newkey = key.CreateSubKe y("WebBrowser") ;
}
}

private void matt_Click(obje ct 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
4871
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 users. The code in my searches have been disclaimed has working with this but not that. I'm not sure how old some of this code is either. thanks!
5
2819
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 written is C#, and is web based. I had hoped there was a URL property or something I could use in the System.IO class, but no such luck, and websites aren't very clear on the steps or even if its at all possible. Again, basically want to read...
9
1745
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 from several combo boxes, click a "Go" command button to launch the report. I then pass the report criteria to various report "templates" as an SQL string.
4
1610
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 backslashes are indeed needed with Registry methods? Second:Am I right in that single backslashes are indeed needed with folder descriptions?
6
1678
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 object with 10 string items into the registry and retreive them later. I tried this: key.SetValue("lstNSXitems", lstNSX.Items) where "lstNSXitems" is the name of the subkey, and lstNSX.Items is the
5
1473
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 directly just with the js, but I do not want to have go beyond javascript and PHP. I have been going over making a mozilla extension as well as getting into some programming for a toolbar(I know some c/c++ and c#), but, if I can do something...
6
7576
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 remove the Favorites menu from Windows Explorer (presumably by use of a group policy), and how can I overcome it and put my favorites menu back where it belongs? Originally I was able to get it back by correcting...
7
1638
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 automatically update and have received some updates to IE 7 occasionally. Usually related to security. -- any help is appreciated.
5
3768
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 my web browser. the problem when i hit the add to favorites button it does nothing. but on form close it creates the favorites.xml file. so i know the problem is somewhere in the add to favorites function. hears my code:
0
8444
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8356
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8869
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8781
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
8639
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
5664
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4198
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
2
2011
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
2
1775
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.