How to change the date and time of my PC using a button Only..
Help pls.. :(
Know the answer? Post it. Somebody with the same question will find it here.
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questions
DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend5days leftRegister
Dipankar BiswasRank #992 · 2K reputationPosted Sep 7, 2014, 1:25 AM EDT
VulpesRank #55 · 29.2K reputationPosted Sep 7, 2014, 7:28 AM EDT
I found a SO thread here showing how to do this:
http://stackoverflow.com/questions/650849/change-system-date-programatically
You'll also need to add the following 'using' directive to your file:
using System.Runtime.InteropServices;
Note that if you're using Windows Vista or later you'll need administrative privileges to call this function.