|
-
Oct 21st, 2000, 12:37 PM
#1
Thread Starter
New Member
Hi Everybody,
Is it possible to change the system date to "dd/mm/yyyy" and time to "HH:mm:ss" format through vb code? If so please let me know how!!!! And Is It possible to deny access to the control panel of windows 9x versions through vb?
-
Oct 22nd, 2000, 02:14 PM
#2
New Member
SetLocaleInfo, can be used to set a wide range of regional settings.
Add the following in the declarations section of our project's code module:
Public Const LOCALE_SSHORTDATE = &H1F
Public Declare Function GetSystemDefaultLCID _
Lib "kernel32" () As Long
Public Declare Function SetLocaleInfo Lib _
"kernel32" Alias "SetLocaleInfoA" ( _
ByVal Locale As Long, _
ByVal LCType As Long, _
ByVal lpLCData As String) As Boolean
Private Sub Main()
Dim lngLocale As Long
lngLocale = GetSystemDefaultLCID()
If SetLocaleInfo(lngLocale, _
LOCALE_SSHORTDATE, _
"MM/dd/yyyy") = _
False Then
' Handle error, possibly by writing it
' to a server error log
End If
End Sub
I hope the above code will help as I was also strugling on the net to find its solution.
Enjoy,
Neeraj Matta.
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
|