Click here to Skip to main content
15,886,032 members
Home / Discussions / C#
   

C#

 
GeneralDES encryption/decryption Pin
devvvy25-Aug-03 16:41
devvvy25-Aug-03 16:41 
GeneralRe: DES encryption/decryption Pin
Julian Bucknall [MSFT]26-Aug-03 5:46
Julian Bucknall [MSFT]26-Aug-03 5:46 
QuestionValid CodeProject Article? Pin
Steven Behnke25-Aug-03 14:41
Steven Behnke25-Aug-03 14:41 
AnswerRe: Valid CodeProject Article? Pin
Ista25-Aug-03 15:13
Ista25-Aug-03 15:13 
GeneralRegistry Errors Pin
mikemilano25-Aug-03 10:57
mikemilano25-Aug-03 10:57 
GeneralRe: Registry Errors Pin
Roger Stewart25-Aug-03 12:02
professionalRoger Stewart25-Aug-03 12:02 
GeneralRe: Registry Errors Pin
mikemilano25-Aug-03 12:57
mikemilano25-Aug-03 12:57 
GeneralRe: Registry Errors Pin
Roger Stewart25-Aug-03 15:11
professionalRoger Stewart25-Aug-03 15:11 
Sorry for the late reply.

Since you know the keys/subkeys that you want to open, try and open/create them all at once. This gets rid of the multiple CreateSubKey/OpenSubKey statements which may be part of the problem.

I was able to get a small example working, that I hope will help you. Create a new C# Windows Application and place 2 buttons (btnRead and btnWrite), one label (label1) on the form. Add the Click events for the two buttons using the Designer Property Grid. Replace the generated Click events with the following code:
<code>
		private void btnRead_Click(object sender, System.EventArgs e)
		{
			RegistryKey softwareKey = Registry.LocalMachine.OpenSubKey(@"Software\SC\Param");
			if ( softwareKey != null )
			{
				int x = (int)softwareKey.GetValue("IHDetailIDWidth", 50); // <-- problem line    
				label1.Text = x.ToString();
			}  
		}

		private void btnWrite_Click(object sender, System.EventArgs e)
		{
			RegistryKey softwareKey = Registry.LocalMachine.OpenSubKey(@"Software\SC\Param", true);  
			softwareKey.SetValue("IHDetailIDWidth",this.Width); // <- problem line
		}
</code>




Roger Stewart
"I Owe, I Owe, it's off to work I go..."

GeneralRe: Registry Errors Pin
mikemilano26-Aug-03 7:06
mikemilano26-Aug-03 7:06 
GeneralScreenshot of Window... Pin
Calamitous25-Aug-03 10:40
Calamitous25-Aug-03 10:40 
Questionhow to retrieve a list of sheet from excel with odbc in c#? Pin
zoltix25-Aug-03 10:15
zoltix25-Aug-03 10:15 
AnswerRe: how to retrieve a list of sheet from excel with odbc in c#? Pin
Csharp™25-Aug-03 11:43
Csharp™25-Aug-03 11:43 
GeneralRe: how to retrieve a list of sheet from excel with odbc in c#? Pin
zoltix25-Aug-03 22:47
zoltix25-Aug-03 22:47 
GeneralDataGridTextBoxColumn.WidthChange to trigger method Pin
mikemilano25-Aug-03 6:49
mikemilano25-Aug-03 6:49 
GeneralRe: DataGridTextBoxColumn.WidthChange to trigger method Pin
Roger Stewart25-Aug-03 7:25
professionalRoger Stewart25-Aug-03 7:25 
GeneralRe: DataGridTextBoxColumn.WidthChange to trigger method Pin
mikemilano25-Aug-03 7:48
mikemilano25-Aug-03 7:48 
QuestionC# Profiling?!? Pin
Alberto Bencivenni25-Aug-03 5:37
Alberto Bencivenni25-Aug-03 5:37 
AnswerRe: C# Profiling?!? Pin
leppie25-Aug-03 8:38
leppie25-Aug-03 8:38 
GeneralRe: C# Profiling?!? Pin
Anonymous25-Aug-03 10:22
Anonymous25-Aug-03 10:22 
GeneralRe: C# Profiling?!? Pin
Alberto Bencivenni25-Aug-03 10:40
Alberto Bencivenni25-Aug-03 10:40 
GeneralNewby Application.StartupPath Problem Pin
GostWryter25-Aug-03 3:06
GostWryter25-Aug-03 3:06 
GeneralRe: Newby Application.StartupPath Problem Pin
David Stone25-Aug-03 4:58
sitebuilderDavid Stone25-Aug-03 4:58 
GeneralRe: Newby Application.StartupPath Problem Pin
GostWryter26-Aug-03 2:01
GostWryter26-Aug-03 2:01 
Generaljava Word maker help required Pin
seunao25-Aug-03 1:43
seunao25-Aug-03 1:43 
GeneralRe: java Word maker help required Pin
Julian Bucknall [MSFT]25-Aug-03 10:25
Julian Bucknall [MSFT]25-Aug-03 10:25 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.