VERSION 5.00
Begin VB.Form ShutDownSystem 
   Caption         =   "Shutdown Windows / Reboot system from VB code Windows 95/98/ME) "
   ClientHeight    =   1440
   ClientLeft      =   60
   ClientTop       =   345
   ClientWidth     =   7575
   LinkTopic       =   "Form1"
   ScaleHeight     =   1440
   ScaleWidth      =   7575
   StartUpPosition =   3  'Windows Default
   Begin VB.CommandButton Command3 
      Caption         =   "&Exit"
      Height          =   495
      Left            =   5040
      TabIndex        =   3
      Top             =   840
      Width           =   2415
   End
   Begin VB.CommandButton Command2 
      Caption         =   "Reboot"
      Height          =   495
      Left            =   2520
      TabIndex        =   1
      Top             =   840
      Width           =   2295
   End
   Begin VB.CommandButton Command1 
      Caption         =   "ShutDown"
      Height          =   495
      Left            =   120
      TabIndex        =   0
      Top             =   840
      Width           =   2295
   End
   Begin VB.Label Label1 
      BackColor       =   &H00C0C0FF&
      Caption         =   "Shutdown Windows / Reboot system from VB code Windows 95/98/ME) "
      BeginProperty Font 
         Name            =   "MS Sans Serif"
         Size            =   13.5
         Charset         =   0
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      ForeColor       =   &H00FFFFFF&
      Height          =   735
      Left            =   120
      TabIndex        =   2
      Top             =   0
      Width           =   7215
   End
End
Attribute VB_Name = "ShutDownSystem"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
      'Sample project to shutdown windows or reboot computer
      'Will not work on windows NT OS
      
       Const EWX_LogOff As Long = 0
       Const EWX_SHUTDOWN = 1
       Const EWX_REBOOT = 2
       Const EWX_FORCE = 4
       Private Declare Function ExitWindows _
               Lib "User32" Alias "ExitWindowsEx" _
               (ByVal dwOptions As Long, ByVal dwReserved As Long) As Long
   
      Private Sub Command1_Click()
          
          'Shut down windows
          ExitWindows EWX_SHUTDOWN, &HFFFFFFFF
      
      
      End Sub
      

      Private Sub Command2_Click()
      
          'Reboot computer
          ExitWindows EWX_REBOOT, &HFFFFFFFF
      
      
      End Sub

Private Sub BersihText()
  With rsPembelian
    txtNoBon.Text = ""
    txtTanggalBon.Text = ""
    cboPelanggan.Text = ""
    cboBarang.Text = ""
    txtNamaBarang.Text = ""
    txtHargaBarang.Text = ""
    txtBanyaknyaBarang.Text = ""
    txtJumlah.Text = ""
  End With
End Sub

Private Sub Command3_Click()
Unload Me
End Sub
