'Form Kodları
Private Sub Command1_Click()
Dim MsgRes As Long
MsgRes = MsgBox("Windows'unuzu kapatmak istiyor musunuz?", vbYesNo Or vbQuestion)
If MsgRes = vbNo Then Exit Sub
Call ExitWindowsEx(Kapat, 0)
Unload Me
End Sub
'Modül Kodları
Declare Function ExitWindowsEx& Lib "user32" (ByVal uFlags As Long, ByVal dwReserved As Long)
Public Const ZorlaKapat = 4
Public Const LOGOFF = 0
Public Const KapatAc = 2
Public Const Kapat = 1