make default webbrowser, and publish problem

hey i just made a simple webbrowser (using IE activeX) an i want to use it as default Webbrowser, how can that be done.

i read something on a post that it can be done with the registry key,

i read something on this link but, i didn;t understand many (visual basic)

this is the link...

http://support.microsoft.com/default.aspx?scid=kb;en-us;299853

isn't there anything easyer or made in C#.

btw i have another question, at my borwser i used some pictures on buttons but when i publish project it;s not working (only when i deselect pictures form buttons) how can i make the publisher to take the pics (they are imported local resources should i use project resource file Resources.resx and import them there)

[960 byte] By [Terrax] at [2007-12-24]
# 1
No, you need to go into the registry. I think it is in /CurrentVersion/Run/shell/ or something close to that.
wizkid1 at 2007-8-31 > top of Msdn Tech,Visual C#,Visual C# General...
# 2
anyting more specific?
Terrax at 2007-8-31 > top of Msdn Tech,Visual C#,Visual C# General...
# 3

Sure, I admit I was very vague :).

In the registry, the folder is: HKEY_CLASSES_ROOT\HTTP\shell\open\command.

You can programmatically change the value of this using Microsoft.Win32.RegistryKey key = new Microsoft.Win32.RegistryKey()

Does this solve your problem?

wizkid1 at 2007-8-31 > top of Msdn Tech,Visual C#,Visual C# General...
# 4

And for the pictures:

Create a folder in the Solution Explorer called Images.

Add the desired images into this folder.

Make sure you select all of the images in Images folder, go to the properties window, and set Copy to Output Directory to CopyAlways.

You can programmatically set an Image to a button like this:

toolStripButton1.Image = Image.FromFile(Application.StartupPath + @"/image.gif");

Or, you can add the image in the designer from the Images folder you created.

Hope this helps!

wizkid1 at 2007-8-31 > top of Msdn Tech,Visual C#,Visual C# General...
# 5

can u plz be more specific with the registry key.

how can i create a registry key

lets assume my browser name is explorer and its installende in "c:\Explorer\Explorer.exe"

Terrax at 2007-8-31 > top of Msdn Tech,Visual C#,Visual C# General...
# 6
btw thx for image, publish thing
Terrax at 2007-8-31 > top of Msdn Tech,Visual C#,Visual C# General...
# 7
Yes, you change the Default key in the above reg. directory to your Application.StartupPath.
wizkid1 at 2007-8-31 > top of Msdn Tech,Visual C#,Visual C# General...
# 8
Could someone give me a script in Visual Express 2005 that would add a browser to the correct registry location. I would greatly appreciate it. I am very new to this, but was able to create a very well equiped webbrowser and I would like to make it an option to be made the default browser, but I'm not sure how to mess with the registry. All the help would be greatly appreciated. THANK YOU!!
XtremeISP at 2007-8-31 > top of Msdn Tech,Visual C#,Visual C# General...
# 9

HKEY_CLASSES_ROOT\HTTP\shell\open\command

Using Win32.RegistryKey, open classes root, then open sub key (HTTP), open sub key (shell), etc.

Modify the value to your Application.StartupPath, say in a CHECKBOX1_CHECKCHANGED event.

Does this help?

EvanMulawski at 2007-8-31 > top of Msdn Tech,Visual C#,Visual C# General...
# 10

i have the same thing execpt im in c++ i would like proven code because it is very dangerous to mess up the registry
BigBill at 2007-8-31 > top of Msdn Tech,Visual C#,Visual C# General...