|
-
Aug 3rd, 2001, 07:07 PM
#1
Thread Starter
Addicted Member
Help: Using GetSystemTime API
I need help using GetSystemTime under VB on a WinXP platform:
When I Declare:
Public Declare Sub GetSystemTime Lib "kernel32" (lpSystemTime As SYSTEMTIME)
It gives me an error like:
"User-defined type not defined", and I beleive that it's reffering to the "As SYSTEMTIME" area.
Can someone please show me how I could show the current time in a lablel when I press a command button.
Thanx,
Mikelo2k
-
Aug 3rd, 2001, 07:14 PM
#2
Member
You did define the type SYSTEMTIME in a module (or general declations section), right?
Maybe this function is deprecated and XP doesn't support it anymore.
-
Aug 3rd, 2001, 07:15 PM
#3
Thread Starter
Addicted Member
Oops!
No, i didn't know. Could you show me an example of it's use?
And what to define SYSTEMTIME as, string?
-
Aug 4th, 2001, 07:55 AM
#4
No, SYSTEMTIME is a structure, so you should define it as:
VB 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
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
|