Berikut ini adalah cara membuat Event Log Off di Visual Basic 6.0
Langkah-langkah:
1. Buat 1 Project dan 1 Form
2. Masukan kode dibawah ini
Private Declare Function ExitWindowsEx Lib "user32" (ByVal uFlags As Long, ByVal dwReserved As Long) As Long
Const EWX_LOGOFF = 0
Const EWX_SHUTDOWN = 1
Const EWX_REBOOT = 2
Const EWX_FORCE = 4
Const EWX_POWEROFF = 8
Const EWX_RESET = EWX_LOGOFF + EWX_FORCE + EWX_REBOOT
Dim Status As String
Private Sub Form_Load()
ExitWindowsEx EWX_LOGOFF, dwReserved
End Sub
0 comments:
Post a Comment
Jika anda ingin berkomentar dan tidak mempunyai akun silahkan pilih anonymous.
Note: only a member of this blog may post a comment.