Click here to Skip to main content
15,895,084 members
Home / Discussions / C#
   

C#

 
AnswerRe: mutlitiple user application Pin
Anonymous11-Sep-05 10:01
Anonymous11-Sep-05 10:01 
AnswerRe: mutlitiple user application Pin
Mohammed Halabi12-Sep-05 5:50
Mohammed Halabi12-Sep-05 5:50 
Questioncustom draw TextBox Pin
g00fyman11-Sep-05 2:42
g00fyman11-Sep-05 2:42 
AnswerRe: custom draw TextBox Pin
Mohamad Al Husseiny11-Sep-05 9:00
Mohamad Al Husseiny11-Sep-05 9:00 
GeneralRe: custom draw TextBox Pin
g00fyman11-Sep-05 13:49
g00fyman11-Sep-05 13:49 
GeneralRe: custom draw TextBox Pin
Mohamad Al Husseiny11-Sep-05 14:34
Mohamad Al Husseiny11-Sep-05 14:34 
GeneralRe: custom draw TextBox Pin
g00fyman11-Sep-05 14:38
g00fyman11-Sep-05 14:38 
QuestionCheck if System Time has changed (by user) Pin
gnjunge11-Sep-05 1:38
gnjunge11-Sep-05 1:38 
Hi everybody,

When my Win forms app runs I need to check whether somebody has changed the system time (more specific: my app has some kind of a max usage days, kind of like any kind of trial ware, but I cannot rely on an internet connection being present).
I thought already of two options but both are not satisfactory:
1) Add a windows service to the machine and let that one check every x seconds/minutes whether the time has changed. (not good, cause I don't want to add such an overhead to the system).
2) When the app runs it sets the current datetime in the registry, next time it runs it checks whether the current date is later than the one of the previous run. (not good since one can everytime turn back the system clock to 1 second after the last run).

It would be great if I could find out the specific datetime on which Windows started, than take the number of seconds it was running (existing API), and by doing basic math see if the time has changed (taking into account a max 60 minutes difference for day light saving time). Does anybody now how to get the startup datetime of windows?
Or does anybody have another good idea?

Thanks,
Gideon

-- modified at 7:40 Sunday 11th September, 2005
AnswerRe: Check if System Time has changed (by user) Pin
Dave Kreskowiak11-Sep-05 7:21
mveDave Kreskowiak11-Sep-05 7:21 
GeneralRe: Check if System Time has changed (by user) Pin
gnjunge12-Sep-05 1:17
gnjunge12-Sep-05 1:17 
GeneralRe: Check if System Time has changed (by user) Pin
Dave Kreskowiak12-Sep-05 1:32
mveDave Kreskowiak12-Sep-05 1:32 
GeneralRe: Check if System Time has changed (by user) Pin
gnjunge12-Sep-05 2:25
gnjunge12-Sep-05 2:25 
Question2 VS UI Q's: Reorder Funcs and Collapse funcs Pin
Niklas Ulvinge11-Sep-05 1:32
Niklas Ulvinge11-Sep-05 1:32 
QuestionHooking 456 port Pin
akshayswaroop11-Sep-05 1:30
akshayswaroop11-Sep-05 1:30 
AnswerRe: Hooking 456 port Pin
KaptinKrunch12-Sep-05 9:33
KaptinKrunch12-Sep-05 9:33 
GeneralRe: Hooking 456 port Pin
Anonymous12-Sep-05 18:53
Anonymous12-Sep-05 18:53 
QuestionDefault Printer Pin
teeka11-Sep-05 1:08
teeka11-Sep-05 1:08 
AnswerRe: Default Printer Pin
Mohamad Al Husseiny11-Sep-05 8:37
Mohamad Al Husseiny11-Sep-05 8:37 
QuestionDockable interface Pin
rmedo11-Sep-05 0:41
rmedo11-Sep-05 0:41 
AnswerRe: Dockable interface Pin
S. Senthil Kumar11-Sep-05 2:51
S. Senthil Kumar11-Sep-05 2:51 
Questiondata relationship Pin
steve_rm10-Sep-05 23:12
steve_rm10-Sep-05 23:12 
AnswerRe: data relationship Pin
Guffa10-Sep-05 23:59
Guffa10-Sep-05 23:59 
QuestionWeb enable a Windows C# app Pin
StrayGrey10-Sep-05 20:06
StrayGrey10-Sep-05 20:06 
AnswerRe: Web enable a Windows C# app Pin
Guffa11-Sep-05 0:02
Guffa11-Sep-05 0:02 
QuestionDataTable PlaceHolder Pin
Expert Coming10-Sep-05 18:40
Expert Coming10-Sep-05 18:40 

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.