Click here to Skip to main content
15,905,563 members
Home / Discussions / C#
   

C#

 
GeneralRe: C#.net active directory options Pin
Richard Andrew x6429-Aug-11 17:00
professionalRichard Andrew x6429-Aug-11 17:00 
QuestionC# low level mouse hook and form events Pin
Ak47AL29-Aug-11 6:21
Ak47AL29-Aug-11 6:21 
AnswerRe: C# low level mouse hook and form events Pin
BillWoodruff29-Aug-11 18:13
professionalBillWoodruff29-Aug-11 18:13 
GeneralRe: C# low level mouse hook and form events Pin
Ak47AL31-Aug-11 5:47
Ak47AL31-Aug-11 5:47 
GeneralRe: C# low level mouse hook and form events Pin
BillWoodruff31-Aug-11 19:11
professionalBillWoodruff31-Aug-11 19:11 
QuestionRegistry Permissions Pin
Zach.Saunders29-Aug-11 4:50
Zach.Saunders29-Aug-11 4:50 
AnswerRe: Registry Permissions Pin
#realJSOP29-Aug-11 5:28
professional#realJSOP29-Aug-11 5:28 
GeneralRe: Registry Permissions [modified] Pin
Zach.Saunders29-Aug-11 6:18
Zach.Saunders29-Aug-11 6:18 
There is a try catch, i didnt post the whole code cuz i didnt think it was important. the exception is null object reference. But i dont get why i could see it in the registry and copy the reg key, but not be able to access it in my program.

Here is the part of code:
C#
try 
{
    string Path =  @"SOFTWARE\Microsoft\Shared Tools\MSConfig\startupreg"; //
    RegistryKey Run = Registry.LocalMachine;
    Run = Run.OpenSubKey(Path, true);
    string[] SubKeys = Run.GetSubKeyNames(); //Says Run is null
    foreach (string SubKeys1 in SubKeys) 
    {
        richTextBox1.Text += SubKeys1 + "/n";
    }
}
catch (Exception ex) 
{
    richTextBox1.Text = ex.ToString();
}


Here is the exception:
System.NullReferenceException: Object reference not set to an instance of an object.
   at RegTest.MainForm.RegTest() in f:\Programming\SharpDevelop\SharpDevelop Projects\RegTest\RegTest\MainForm.cs:line 41


modified on Monday, August 29, 2011 12:35 PM

GeneralRe: Registry Permissions Pin
Anthony Mushrow29-Aug-11 7:36
professionalAnthony Mushrow29-Aug-11 7:36 
AnswerRe: Registry Permissions Pin
Abhinav S29-Aug-11 6:51
Abhinav S29-Aug-11 6:51 
AnswerRe: Registry Permissions Pin
Zach.Saunders29-Aug-11 8:34
Zach.Saunders29-Aug-11 8:34 
GeneralRe: Registry Permissions Pin
Anthony Mushrow29-Aug-11 8:48
professionalAnthony Mushrow29-Aug-11 8:48 
GeneralRe: Registry Permissions Pin
Zach.Saunders29-Aug-11 9:04
Zach.Saunders29-Aug-11 9:04 
GeneralRe: Registry Permissions Pin
Anthony Mushrow29-Aug-11 9:24
professionalAnthony Mushrow29-Aug-11 9:24 
GeneralRe: Registry Permissions Pin
Zach.Saunders29-Aug-11 10:47
Zach.Saunders29-Aug-11 10:47 
QuestionC# Button Click - Press and Release Pin
asterix529-Aug-11 1:33
asterix529-Aug-11 1:33 
AnswerRe: C# Button Click - Press and Release Pin
Shameel29-Aug-11 2:02
professionalShameel29-Aug-11 2:02 
GeneralRe: C# Button Click - Press and Release Pin
asterix529-Aug-11 4:06
asterix529-Aug-11 4:06 
GeneralRe: C# Button Click - Press and Release Pin
Shameel29-Aug-11 5:42
professionalShameel29-Aug-11 5:42 
AnswerRe: C# Button Click - Press and Release PinPopular
Wayne Gaylard29-Aug-11 2:52
professionalWayne Gaylard29-Aug-11 2:52 
Question2D FFT / DFT + NxN Convolution (image processing) [SOLVED] [modified] Pin
Dusan Paulovic29-Aug-11 1:10
Dusan Paulovic29-Aug-11 1:10 
AnswerRe: 2D FFT / DFT + NxN Convolution (image processing) Pin
share_holder29-Aug-11 1:54
share_holder29-Aug-11 1:54 
GeneralRe: 2D FFT / DFT + NxN Convolution (image processing) Pin
Dusan Paulovic29-Aug-11 5:13
Dusan Paulovic29-Aug-11 5:13 
GeneralRe: 2D FFT / DFT + NxN Convolution (image processing) Pin
MicroVirus29-Aug-11 2:00
MicroVirus29-Aug-11 2:00 
GeneralRe: 2D FFT / DFT + NxN Convolution (image processing) Pin
Dusan Paulovic29-Aug-11 5:11
Dusan Paulovic29-Aug-11 5:11 

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.