Minggu, 06 Juli 2014

Tutorial Membuat Program Alarm!! Dengan VB 2008

Yosh!! berhubung dapat tugas membuat program sederhana dengan VB akhirnya aku memutuskan membuat program alarm ini sebagai tugas :p ya, maklumlah kalau sederhana banget. namanya juga lagi belajar!!!

Yosh!! langsung saja berikut tutorialnya!!!!

By : Rinda Syellina Tri Hesti
Source Code :

Public Class Form1

    Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load        Timer1.Start()        TextBox1.Text = TimeOfDay    End Sub
    Private Sub Label1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Label1.Click        Label1.Text = TimeOfDay    End Sub
    Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick        Label1.Text = TimeOfDay + "   " + DateString    End Sub
    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click        Timer2.Start()        MsgBox("Alarm Set!")    End Sub
    Private Sub Timer2_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer2.Tick        If TextBox1.Text = TimeOfDay Then
            Me.Show()            MsgBox("It Is: " + TimeOfDay, MsgBoxStyle.Critical)        End If
    End Sub
    Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click        Me.Close()    End Sub
End Class
1.       Buat Desain awal!!

Untuk Label1 Dengan Properties :


Untuk TexsBox Dengan Properties :

Untuk Button properties :

2.       Selanjutnya Mengisi source codenya :
a.       Untuk From1
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        Timer1.Start()        TextBox1.Text = TimeOfDay    End Sub
b.      Untuk Label1
Private Sub Label1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Label1.Click
        Label1.Text = TimeOfDay    End Sub
c.       Untuk Timer

Hasilnya :

Pilih timer1  :
Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick
        Label1.Text = TimeOfDay + "   " + DateStringEnd Sub
d.  Untuk Set
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
        Timer2.Start()        MsgBox("Alarm Set!")    End Sub
e.  Untuk Timer2

Private Sub Timer2_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer2.Tick
        If TextBox1.Text = TimeOfDay Then
            Me.Show()            MsgBox("It Is: " + TimeOfDay, MsgBoxStyle.Critical)        End If
    End Sub
f.  Untuk Button “Close”
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
        Me.Close()    End Sub
3.  Sekarang anda bisa mulai menjalankannya!!!
Hasilnya akan jadi seperti ini.

Selamat Mencoba!!!!
cr :http://loveheart137.blogspot.com/2013/12/tutorial-membuat-program-alarm-dengan.html





Tidak ada komentar:

Posting Komentar