|
-
Sep 12th, 2012, 08:09 AM
#1
Thread Starter
Member
How to avoid changing date and time?
Hello.
I need to disable windows (XP and Seven) time and date changing by user when my app is running and of course enable it when my app closes.
How to do that in VB6?
Thanks.
-
Sep 12th, 2012, 09:00 AM
#2
Re: How to avoid changing date and time?
-
Sep 12th, 2012, 09:20 AM
#3
New Member
Re: How to avoid changing date and time?
This needs to apply restriction on changing datetime on the user from Group Policy. Hence you need to code for that. And depending on the system and user's permission I can't assure that it will work always.
Alternatively it is better to make your app so that it does not depend on system datetime while it is running. To do that you can read the system datetime at the start of your app. Then start a Timer and create your new datetime assigning it to the initial date plus timer instead of taking datetime from the system while your app running. Let me know if you want to do this process but do not know how to use timer.
Cheers
-
Sep 12th, 2012, 09:56 AM
#4
Re: How to avoid changing date and time?
This does beg the question - why? - what's so special about your program that requires the Date and Time not to change?
-
Sep 12th, 2012, 01:09 PM
#5
Thread Starter
Member
Re: How to avoid changing date and time?
 Originally Posted by orchestra
Alternatively it is better to make your app so that it does not depend on system datetime while it is running. To do that you can read the system datetime at the start of your app. Then start a Timer and create your new datetime assigning it to the initial date plus timer instead of taking datetime from the system while your app running. Let me know if you want to do this process but do not know how to use timer.
That's a good idea, and yes I know how to use timers. In fact, I'm not the author of the app. Mistakenly I said "my app" but it's not.
But I need to fix this problem because some data are recorded with local date and time and if user changes these then serious problems happen.
I'm trying to use FindWindow/CloseWindow and a timer so that I can close "time and date" window when user opens it.]
Of course it's not the better solution, but it's the only I have at this moment.
-
Sep 12th, 2012, 01:10 PM
#6
Thread Starter
Member
Re: How to avoid changing date and time?
 Originally Posted by Doogle
This does beg the question - why? - what's so special about your program that requires the Date and Time not to change?
Please, read my reply to "Orchestra".
Thanks.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|