Click here to Skip to main content
15,916,945 members
Home / Discussions / C#
   

C#

 
GeneralRe: re: proxy page rank Pin
Pete O'Hanlon20-Sep-09 11:42
mvePete O'Hanlon20-Sep-09 11:42 
GeneralRe: re: proxy page rank Pin
Omar Gameel Salem20-Sep-09 11:58
professionalOmar Gameel Salem20-Sep-09 11:58 
GeneralRe: re: proxy page rank Pin
Pete O'Hanlon20-Sep-09 12:29
mvePete O'Hanlon20-Sep-09 12:29 
GeneralRe: re: proxy page rank Pin
Richard MacCutchan20-Sep-09 21:49
mveRichard MacCutchan20-Sep-09 21:49 
Questionrename [Main Report] tab Pin
Jassim Rahma20-Sep-09 8:13
Jassim Rahma20-Sep-09 8:13 
Questionhelp with both grouping plz Pin
Jassim Rahma20-Sep-09 8:11
Jassim Rahma20-Sep-09 8:11 
AnswerRe: help with both grouping plz Pin
Abhishek Sur20-Sep-09 10:58
professionalAbhishek Sur20-Sep-09 10:58 
QuestionProblem Reading And Writing Registry In C# Pin
Ben Magee20-Sep-09 5:06
Ben Magee20-Sep-09 5:06 
Hi guys,

I have this code in my form1_load event:

 RegistryKey licenseCheck = Registry.LocalMachine.OpenSubKey(@"software/openorganise");
 string licenseCo = licenseCheck.GetValue("tlb").ToString();
DateTime licenseDate = Convert.ToDateTime(licenseCo);
     if (licenseDate.AddDays(30) == System.DateTime.Now)
     {
         MessageBox.Show("Your OpenOrganise License Has Expired. Please Purchase A New One.", "OpenOrganise Message.", MessageBoxButtons.OK, MessageBoxIcon.Warning);
         Application.Exit();
     }


now, ive got a config value that sets it to write to a file if its the first time run or not, etc etc, this works fine, in the event of a first run i have:

RegistryKey licenseKey;
                licenseKey = Registry.LocalMachine.CreateSubKey(@"Software\openorganise");
                licenseKey.SetValue("tlb",DateTime.Now);
                Registry.LocalMachine.Flush();


However, when running the application i get: "object referance not set to a instance of a object"

Im stumped to as why. I even went and manually made the reg key.

thanks,
Ben.
AnswerRe: Problem Reading And Writing Registry In C# Pin
Luc Pattyn20-Sep-09 5:21
sitebuilderLuc Pattyn20-Sep-09 5:21 
AnswerRe: Problem Reading And Writing Registry In C# Pin
Richard MacCutchan20-Sep-09 5:30
mveRichard MacCutchan20-Sep-09 5:30 
AnswerRe: Problem Reading And Writing Registry In C# Pin
Alan N20-Sep-09 8:02
Alan N20-Sep-09 8:02 
GeneralRe: Problem Reading And Writing Registry In C# Pin
Ben Magee20-Sep-09 8:24
Ben Magee20-Sep-09 8:24 
GeneralRe: Problem Reading And Writing Registry In C# Pin
Luc Pattyn20-Sep-09 8:34
sitebuilderLuc Pattyn20-Sep-09 8:34 
GeneralRe: Problem Reading And Writing Registry In C# Pin
Ben Magee20-Sep-09 8:36
Ben Magee20-Sep-09 8:36 
GeneralRe: Problem Reading And Writing Registry In C# Pin
Luc Pattyn20-Sep-09 9:09
sitebuilderLuc Pattyn20-Sep-09 9:09 
GeneralRe: Problem Reading And Writing Registry In C# Pin
Richard MacCutchan20-Sep-09 9:34
mveRichard MacCutchan20-Sep-09 9:34 
QuestionPlaying multiple wav files simultaneously in C# Pin
Zorro00020-Sep-09 3:37
Zorro00020-Sep-09 3:37 
AnswerRe: Playing multiple wav files simultaneously in C# Pin
N a v a n e e t h20-Sep-09 4:36
N a v a n e e t h20-Sep-09 4:36 
GeneralRe: Playing multiple wav files simultaneously in C# Pin
Zorro00020-Sep-09 10:02
Zorro00020-Sep-09 10:02 
GeneralRe: Playing multiple wav files simultaneously in C# Pin
N a v a n e e t h20-Sep-09 16:58
N a v a n e e t h20-Sep-09 16:58 
Questionhelp with udp code snippet... Pin
emperorhere20-Sep-09 3:19
emperorhere20-Sep-09 3:19 
AnswerRe: help with udp code snippet...[CrossPost] Pin
Richard MacCutchan20-Sep-09 3:55
mveRichard MacCutchan20-Sep-09 3:55 
AnswerRe: help with udp code snippet... Pin
EliottA20-Sep-09 3:55
EliottA20-Sep-09 3:55 
AnswerRe: help with udp code snippet... Pin
harold aptroot20-Sep-09 4:28
harold aptroot20-Sep-09 4:28 
Questionhelp with udp code snippet... Pin
emperorhere20-Sep-09 3:17
emperorhere20-Sep-09 3:17 

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.