请问哪们大哥;可以帮我一个忙???    在运行VB的某一个程序时....里面加上代码对计算机的时间进行锁定...不允许修改!!!第一次运行时锁定....以后每次运行时都只进行判断.....修改注册表.......
哪位大哥来帮帮小弟啊!!!
拜托!!拜托!!!

解决方案 »

  1.   

    尝试了一下,如果需要使用代码,似乎在程序退出后,还是可以更改时间代码如下:Private Type OFSTRUCT
        cBytes As Byte
        fFixedDisk As Byte
        nErrCode As Integer
        Reserved1 As Integer
        Reserved2 As Integer
        szPathName As String * 128
    End TypePrivate Const OF_SHARE_EXCLUSIVE = &H10Private Declare Function OpenFile Lib "kernel32" (ByVal lpFileName As String, lpReOpenBuff As OFSTRUCT, ByVal wStyle As Long) As LongPrivate Sub Command1_Click()
        Dim m As OFSTRUCT
        
        OpenFile "c:\windows\system32\timedate.cpl", m, OF_SHARE_EXCLUSIVE
        
    End Sub
    如果当前将该文件打开,则用户无法更改系统时间(通过控制面版或者是桌面右下角双击)建议
    系统在运行时,Shell一个net time命令,将某个服务器的时间(其他用户无权操作)更新为系统时间,然后再将控制面版锁死