Mohon tunggu...
Wawan Supriadi
Wawan Supriadi Mohon Tunggu... lainnya -

LAHIR DI SUMEDANG TANGGAL 20 NOVEMBER 1966 -. PERNAH JADI GURU DI SMP DAN SMK SEJAK TAHUN 1988 SAMPAI TAHUN 2013. PROGRAMMER DI RSU KABUPATEN SUMEDANG - SENANG MEMPELAJARI SOFTWARE 3D ANIMATION E-Mail wulansoft.computindo@gmail.com Website :http://rsudsumedang.com

Selanjutnya

Tutup

Nature Artikel Utama

VB6: Source Code Bell Otomatis

26 Desember 2010   09:09 Diperbarui: 26 Juni 2015   10:23 4529
+
Laporkan Konten
Laporkan Akun
Kompasiana adalah platform blog. Konten ini menjadi tanggung jawab bloger dan tidak mewakili pandangan redaksi Kompas.

OpenProcessToken hdlProcessHandle, (TOKEN_ADJUST_PRIVILEGES Or _ TOKEN_QUERY), hdlTokenHandle

' Get the LUID for shutdown privilege.

LookupPrivilegeValue "", "SeShutdownPrivilege", tmpLuid

tkp.PrivilegeCount = 1 ' One privilege to set

tkp.TheLuid = tmpLuid tkp.Attributes = SE_PRIVILEGE_ENABLED

' Enable the shutdown privilege in the access token of this process.

AdjustTokenPrivileges hdlTokenHandle, False, _ tkp, Len(tkpNewButIgnored), tkpNewButIgnored, lBufferNeeded

End Sub

Public Sub ShutDown() AdjustToken ExitWindowsEx (EWX_SHUTDOWN), &HFFFF End Sub

Public Sub ReStart()

AdjustToken ExitWindowsEx (EWX_FORCE), &HFFFF

End Sub

Public Sub ReBooT() AdjustToken ExitWindowsEx (EWX_REBOOT), &HFFFF End Sub Source Code Bell Otomatis Update Ke-3

Dim db As Connection

Dim Con1, Con2 As Recordset Dim List As Variant Private Declare Function mciSendString Lib "winmm.dll" Alias "mciSendStringA" (ByVal lpstrCommand As String, ByVal lpstrReturnString As String, ByVal uReturnLength As Long, ByVal hwndCallback As Long) As Long Private Declare Function GetShortPathName Lib "kernel32" Alias "GetShortPathNameA" (ByVal lpszLongPath As String, ByVal lpszShortPath As String, ByVal cchBuffer As Long) As Long Private Declare Function GetActiveWindow Lib "user32" () As Long Private Declare Function SetWindowText Lib "user32" Alias "SetWindowTextA" (ByVal hwnd As Long, ByVal lpString As String) As Long Dim wHandler As Long Dim fShortName As String, TrackLength As String * 60 Dim a As Integer, cou As Integer Dim tt As Boolean Option Explicit

Public Function GetShortName(ByVal sLongFileName As String) As String

Dim lRetVal As Long Dim sShortPathName As String Dim iLen As Integer 'Set up buffer area for API function cal ' l return sShortPathName = Space(255) iLen = Len(sShortPathName) 'Call the function lRetVal = GetShortPathName(sLongFileName, sShortPathName, iLen) 'Strip away unwanted characters. GetShortName = Left(sShortPathName, lRetVal) End Function

Sub Pesan()

TaskDialog.Reset TaskDialog.CommonButtons = 0 TaskDialog.WindowTitle = "Informasi" TaskDialog.MainIcon = xtpTaskIconInformation TaskDialog.MessageBoxStyle = True TaskDialog.EnableCommandLinks = True TaskDialog.FooterText = "Programmer Wawan Supriadi" & Chr(13) & "Wulansoft° Soft Computindo" & Chr(13) & "Tahun 2010" TaskDialog.FooterIcon = xtpTaskIconShield

End Sub

Sub Buka()

Combo1.Locked = False PT1.Locked = False PT2.Locked = False ME1.Enabled = True

End Sub

HALAMAN :
  1. 1
  2. 2
  3. 3
  4. 4
  5. 5
  6. 6
  7. 7
  8. 8
  9. 9
  10. 10
  11. 11
Mohon tunggu...

Lihat Konten Nature Selengkapnya
Lihat Nature Selengkapnya
Beri Komentar
Berkomentarlah secara bijaksana dan bertanggung jawab. Komentar sepenuhnya menjadi tanggung jawab komentator seperti diatur dalam UU ITE

Belum ada komentar. Jadilah yang pertama untuk memberikan komentar!
LAPORKAN KONTEN
Alasan
Laporkan Konten
Laporkan Akun