Function HanyaAngka(ByRef KeyAscii As Integer)
If ((KeyAscii < 48 And KeyAscii <> 8) Or KeyAscii > 57) Then
MsgBox "Isilah dengan angka!", vbExclamation, App.Title
KeyAscii = 0
End If
End Function
Function HijriDate()
Dim xTgl As String
Dim xHijri As String
Dim days As DayConstants
xTgl = Format(xLoginDate, "yyyy-mm-dd")
days = Date - CDate(xTgl)
days = days + 1
DateTime.Calendar = vbCalHijri
xHijri = Format(Date - days, "dd-mm-yyyy")
xSistemHijriDate = xHijri
If Mid(xHijri, 4, 2) = "01" Then xHijri = Replace(xHijri, "-01-", " Muharram ")
If Mid(xHijri, 4, 2) = "02" Then xHijri = Replace(xHijri, "-02-", " Safar ")
If Mid(xHijri, 4, 2) = "03" Then xHijri = Replace(xHijri, "-03-", " Rabiul Awal ")
If Mid(xHijri, 4, 2) = "04" Then xHijri = Replace(xHijri, "-04-", " Rabiul Akhir ")
If Mid(xHijri, 4, 2) = "05" Then xHijri = Replace(xHijri, "-05-", " Jumadal Ula ")
If Mid(xHijri, 4, 2) = "06" Then xHijri = Replace(xHijri, "-06-", " Jumadal Tsani ")
If Mid(xHijri, 4, 2) = "07" Then xHijri = Replace(xHijri, "-07-", " Rajab ")
If Mid(xHijri, 4, 2) = "08" Then xHijri = Replace(xHijri, "-08-", " Sya'ban ")
If Mid(xHijri, 4, 2) = "09" Then xHijri = Replace(xHijri, "-09-", " Ramadhan ")
If Mid(xHijri, 4, 2) = "10" Then xHijri = Replace(xHijri, "-10-", " Syawwal ")
If Mid(xHijri, 4, 2) = "11" Then xHijri = Replace(xHijri, "-11-", " Dzulkaidah ")
If Mid(xHijri, 4, 2) = "12" Then xHijri = Replace(xHijri, "-12-", " Dzulhijjah ")
xLoginHijri = xHijri
DateTime.Calendar = vbCalGreg
End Function
Function CpuId() As String
Dim computer As String
Dim wmi As Variant
Dim processors As Variant
Dim cpu As Variant
Dim cpu_ids As String
computer = "."
Set wmi = GetObject("winmgmts:" & _
"{impersonationLevel=impersonate}!\\" & _
computer & "\root\cimv2")
Set processors = wmi.ExecQuery("Select * from " & _
"Win32_Processor")
For Each cpu In processors
cpu_ids = cpu_ids & ", " & cpu.ProcessorID
Next cpu
If Len(cpu_ids) > 0 Then cpu_ids = Mid$(cpu_ids, 3)
CpuId = cpu_ids
End Function
Vb Script - 2
02.59 |
Labels:
Programming
Langganan:
Posting Komentar (Atom)
0 comments:
Posting Komentar