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]
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?
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!
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"
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!!
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?