Wrox Programmer Forums
Go Back   Wrox Programmer Forums > C# and C > C# 1.0 > C#
|
C# Programming questions specific to the Microsoft C# language. See also the forum Beginning Visual C# to discuss that specific Wrox book and code.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the C# section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old June 20th, 2005, 06:44 AM
Authorized User
 
Join Date: May 2005
Posts: 21
Thanks: 0
Thanked 0 Times in 0 Posts
Default Problem regarding the IE

Hi all
Please tell me how can i change the Home Page of the Internet Explorer on button click in C#
Thanks in advance

 
Old June 20th, 2005, 08:02 AM
planoie's Avatar
Friend of Wrox
 
Join Date: Aug 2003
Posts: 5,407
Thanks: 0
Thanked 16 Times in 16 Posts
Default

Are you trying to write a web application that does this? Or is this a desktop based application?

-Peter
 
Old June 21st, 2005, 12:09 AM
Authorized User
 
Join Date: May 2005
Posts: 21
Thanks: 0
Thanked 0 Times in 0 Posts
Default

I am trying this on the desktop based application on the button click

 
Old June 21st, 2005, 08:05 AM
planoie's Avatar
Friend of Wrox
 
Join Date: Aug 2003
Posts: 5,407
Thanks: 0
Thanked 16 Times in 16 Posts
Default

You'll have to look into editing registry values.

-Peter
 
Old June 23rd, 2005, 06:13 AM
Authorized User
 
Join Date: May 2005
Posts: 21
Thanks: 0
Thanked 0 Times in 0 Posts
Default

RegistryKey regKey;
            regKey = Registry.LocalMachine.OpenSubKey("Software\\Micros oft\\Internet Explorer\\Main", true);
            regKey.SetValue("aa","cc");


            regKey.Flush();
            Registry.LocalMachine.Close();


this is the code i am writing for changing the value of aa from bb to cc but it is giving the error that the object is not initialized
please help me

 
Old June 26th, 2005, 01:31 PM
planoie's Avatar
Friend of Wrox
 
Join Date: Aug 2003
Posts: 5,407
Thanks: 0
Thanked 16 Times in 16 Posts
Default

I see 2 potential problems here:

1. Does the case matter? The SOFTWARE node in the registry is usually upper case.

2. Presumably, if you can't find the node, you'll need to create a new subkey instance and add it to the desired key location.

-Peter









Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.