If PT2.Text = "" Or PT2.Text = "-" Then PushButton2.Enabled = False PushButton3.Enabled = False Else PushButton2.Enabled = True PushButton3.Enabled = True End If
End Sub
Private Sub PT2_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then If PushButton1.Caption = "Simpan" Then PushButton1_Click If PushButton2.Caption = "Simpan" Then PushButton2_Click End If
End Sub
Private Sub PushButton1_Click()
Dim Urutan As String If PushButton1.Caption = "Tambah" Then PushButton1.Caption = "Simpan" PushButton7.Enabled = True
Buka
Bersih Combo1.SetFocus
Else
Pesan
TaskDialog.MainInstructionText = "INPUT DATA" TaskDialog.ContentText = "Hari : " & Combo1.Text & Chr(13) & "Uraian : " & PT1.Text & Chr(13) & "Jam : " & ME1.Text & Chr(13) & "Suara : " & PT2.Text & Chr(13) & Chr(13) & "Input Data Sudah Benar ?" TaskDialog.AddButton "Sudah Benar, Tambah Data Lagi", 102 TaskDialog.AddButton "Sudah Benar, Selesai", 103 TaskDialog.AddButton "Belum Benar", 999 TaskDialog.ShowDialog
End If
End Sub
Private Sub PushButton10_Click()
SaveSetting App.Title, "Settings", "Jam", Combo2.Text SaveSetting App.Title, "Settings", "Menit", Combo3.Text
If PushButton10.Caption = "Set" Then
PushButton10.Caption = "Reset" Label5.Caption = Combo2.Text & ":" & Combo3.Text Label6.Caption = "Auto Shot Down pada jam : " & Label5.Caption SaveSetting App.Title, "Settings", "Tombol", "Reset"
Else
Label5.Caption = "X" Label6.Caption = "Auto Shut Down Tidak Aktip" PushButton10.Caption = "Set" SaveSetting App.Title, "Settings", "Tombol", "Set"
End If
End Sub
Private Sub PushButton2_Click()
If PushButton2.Caption = "Ubah" Then PushButton2.Caption = "Simpan" PushButton7.Enabled = True
Buka
Combo1.Locked = True PT1.Locked = True ME1.SetFocus
Else
Pesan