16-04-20, 01:12 AM
وعليكم السلام ورحمة الله وبركاته
ممكن تغيير فورمات الاداة DTPicker
جرب التالي
اما تغيير فورمات الويندوز عند تشغيل البرنامج وارجاعه الي ماكان عليه عند اغلاق البرنامج
جرب التالي
بالتوفيق .
ممكن تغيير فورمات الاداة DTPicker
جرب التالي
PHP كود :
Private Sub Form_Load()
DTPicker1.Format = dtpCustom
DTPicker1.CustomFormat = "dd" & "/" & "MM" & "/" & "yyyy"
End Sub
اما تغيير فورمات الويندوز عند تشغيل البرنامج وارجاعه الي ماكان عليه عند اغلاق البرنامج
جرب التالي
PHP كود :
Option Explicit
Private Const LOCALE_SSHORTDATE = &H1F
Private Declare Function GetSystemDefaultLCID Lib "kernel32" () As Long
Private Declare Function SetLocaleInfo Lib "kernel32" Alias "SetLocaleInfoA" (ByVal Locale As Long, ByVal LCType As Long, ByVal lpLCData As String) As Boolean
Private Declare Function GetLocaleInfo Lib "kernel32" Alias "GetLocaleInfoA" (ByVal Locale As Long, ByVal LCType As Long, ByVal lpLCData As String, ByVal cchData As Long) As Long
Dim lLocal As Long
Dim length As Long
Dim buf As String * 1024
Dim a
Private Sub Form_Load()
lLocal = GetSystemDefaultLCID()
length = GetLocaleInfo(lLocal, LOCALE_SSHORTDATE, buf, Len(buf))
a = Left$(buf, length - 1)
If SetLocaleInfo(lLocal, LOCALE_SSHORTDATE, "MM/dd/yyyy") = False Then
End If
End Sub
Private Sub Form_Unload(Cancel As Integer)
If SetLocaleInfo(lLocal, LOCALE_SSHORTDATE, a) = False Then
End If
End Sub
بالتوفيق .
