Put an Inet control in your program and query a time server periodically. You can't prevent users from doing things to the computer when your program isn't running.