|
-
May 21st, 2001, 02:08 AM
#1
Thread Starter
Fanatic Member
it's fine with NT, heres the code:
Code:
Private Type SYSTEMTIME
wYear As Integer
wMonth As Integer
wDayOfWeek As Integer
wDay As Integer
wHour As Integer
wMinute As Integer
wSecond As Integer
wMilliseconds As Integer
End Type
Private Declare Function SetSystemTime _
Lib "kernel32" (lpSystemTime As SYSTEMTIME) As Long
Private Declare Sub GetSystemTime _
Lib "kernel32" (lpSystemTime As SYSTEMTIME)
Private Sub Command1_Click()
Dim oldtime As SYSTEMTIME
GetSystemTime oldtime
End Sub
Private Sub Command2_Click()
Dim tNew As SYSTEMTIME
Dim lRet&
With tNew
.wDay = 20
.wDayOfWeek = 0
.wHour = 7
.wMilliseconds = 12
.wMinute = 30
.wMonth = 5
.wSecond = 21
.wYear = 2001
End With
lRet = SetSystemTime(tNew)
End Sub
Crispin
VB6 ENT SP5
VB.NET
W2K ADV SVR SP3
WWW.BLOCKSOFT.CO.UK
[Microsoft Basic: 1976-2001, RIP]
-
May 21st, 2001, 04:33 PM
#2
New Member
Thanks, but i know how to call the function.
I'm not actually using VB, but it should work and it does work on windows 98, just not NT.
-
May 22nd, 2001, 06:47 AM
#3
Thread Starter
Fanatic Member
works for me on NT, do you have rights to change the time?
Crispin
VB6 ENT SP5
VB.NET
W2K ADV SVR SP3
WWW.BLOCKSOFT.CO.UK
[Microsoft Basic: 1976-2001, RIP]
-
May 22nd, 2001, 04:09 PM
#4
New Member
No i don't. That's the reason i made the prog to try to change the time, heh. I thought it would work. That explains it then ;[
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
|