Indonesian SWF Editor Community |
SELAMAT Datang Di Cmonhackns ===> Mulailah dari yang kecil... karena semua yang besar dulunya juga kecil..
|
| | Membuat Stopwatch Di Visual Basic 2008 | |
| | Author | Message |
---|
aaa123 Warga Lama
Jumlah posting : 63 Join date : 2011-04-23 Age : 25 Lokasi : Di Hatimu
| Subject: Membuat Stopwatch Di Visual Basic 2008 Thu Aug 04, 2011 5:06 pm | |
| [You must be registered and logged in to see this image.]untuk membuat stopwatch yang harus di lakukan : 1. add button di toolbox beri nama button1 2. add label di toolbox beri nama label1 3. add timer di toolbox beri nama timer1 Tambahkan variable terlebih dahulu - Code:
-
Dim detik, menit, jam As Integer Dim a As Boolean didalam koding dibawah Public Class Form1 sertakan koding ini juga - Code:
-
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Timer1.Enabled = False a = True End Sub setelah itu doubleklik button1 nya dan masukan koding berikut - Code:
-
If a = True Then Timer1.Start() a = False Else Timer1.Stop() a = True End If doubleklik timer1 dan masukan koding berikut - Code:
-
If detik = 60 Then detik = 0 menit = menit + 1 End If If menit = 60 Then If detik = 0 Then detik = 0 menit = 0 jam = jam + 1 End If End If detik = detik + 1 Label1.Text = Format(jam, "00") & ":" & Format(menit, "00") & ":" & Format(detik, "00") selesai koding akhirnya harus seperti ini - Code:
-
Public Class Form1 Dim detik, menit, jam As Integer Dim a As Boolean Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
If a = True Then Timer1.Start() a = False Else Timer1.Stop() a = True End If
End Sub
Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick If detik = 60 Then detik = 0 menit = menit + 1 End If If menit = 60 Then If detik = 0 Then detik = 0 menit = 0 jam = jam + 1 End If End If detik = detik + 1 Label1.Text = Format(jam, "00") & ":" & Format(menit, "00") & ":" & Format(detik, "00") End Sub
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Timer1.Enabled = False a = True End Sub End Class | |
| | | Vierra Admin
Jumlah posting : 876 Join date : 2011-06-10 Age : 26
| Subject: Re: Membuat Stopwatch Di Visual Basic 2008 Thu Aug 04, 2011 5:46 pm | |
| - aaa123 wrote:
- [You must be registered and logged in to see this image.]
untuk membuat stopwatch yang harus di lakukan :
1. add button di toolbox beri nama button1 2. add label di toolbox beri nama label1 3. add timer di toolbox beri nama timer1
Tambahkan variable terlebih dahulu - Code:
-
Dim detik, menit, jam As Integer Dim a As Boolean didalam koding dibawah Public Class Form1
sertakan koding ini juga - Code:
-
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Timer1.Enabled = False a = True End Sub setelah itu
doubleklik button1 nya dan masukan koding berikut - Code:
-
If a = True Then Timer1.Start() a = False Else Timer1.Stop() a = True End If doubleklik timer1 dan masukan koding berikut - Code:
-
If detik = 60 Then detik = 0 menit = menit + 1 End If If menit = 60 Then If detik = 0 Then detik = 0 menit = 0 jam = jam + 1 End If End If detik = detik + 1 Label1.Text = Format(jam, "00") & ":" & Format(menit, "00") & ":" & Format(detik, "00") selesai
koding akhirnya harus seperti ini - Code:
-
Public Class Form1 Dim detik, menit, jam As Integer Dim a As Boolean Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
If a = True Then Timer1.Start() a = False Else Timer1.Stop() a = True End If
End Sub
Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick If detik = 60 Then detik = 0 menit = menit + 1 End If If menit = 60 Then If detik = 0 Then detik = 0 menit = 0 jam = jam + 1 End If End If detik = detik + 1 Label1.Text = Format(jam, "00") & ":" & Format(menit, "00") & ":" & Format(detik, "00") End Sub
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Timer1.Enabled = False a = True End Sub End Class wew, Nice Share gan, ini bisa di pake di VB 6 g ? ane g pnya VB 8 | |
| | | K a c a n g Warga Lama
Jumlah posting : 228 Join date : 2011-02-06 Age : 34
| Subject: Re: Membuat Stopwatch Di Visual Basic 2008 Thu Aug 04, 2011 7:43 pm | |
| tutornya kurang jelas bro..dan ini creditnya siapa bro ? | |
| | | Alex_Njsg Sesepuh
Jumlah posting : 390 Join date : 2011-01-10 Age : 33 Lokasi : Hidden
| | | | K a c a n g Warga Lama
Jumlah posting : 228 Join date : 2011-02-06 Age : 34
| Subject: Re: Membuat Stopwatch Di Visual Basic 2008 Thu Aug 04, 2011 8:14 pm | |
| ga jelas yg ini bro tutornya - Spoiler:
Tambahkan Variable terlebih dahulu - Code:
-
Dim detik, menit, jam As Integer Dim a As Boolean
ama yg ini - Spoiler:
kode akhir seperti ini : - Code:
-
Public Class Form1 Dim detik, menit, jam As Integer Dim a As Boolean Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
If a = True Then Timer1.Start() a = False Else Timer1.Stop() a = True End If
End Sub
Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick If detik = 60 Then detik = 0 menit = menit + 1 End If If menit = 60 Then If detik = 0 Then detik = 0 menit = 0 jam = jam + 1 End If End If detik = detik + 1 Label1.Text = Format(jam, "00") & ":" & Format(menit, "00") & ":" & Format(detik, "00") End Sub
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Timer1.Enabled = False a = True End Sub End Class
| |
| | | aaa123 Warga Lama
Jumlah posting : 63 Join date : 2011-04-23 Age : 25 Lokasi : Di Hatimu
| Subject: Re: Membuat Stopwatch Di Visual Basic 2008 Fri Aug 05, 2011 2:39 pm | |
| - K a c a n g wrote:
- tutornya kurang jelas bro..dan ini creditnya siapa bro ?
credit saya sendiri - K a c a n g wrote:
- ga jelas yg ini bro tutornya
- Spoiler:
Tambahkan Variable terlebih dahulu - Code:
-
Dim detik, menit, jam As Integer Dim a As Boolean ama yg ini - Spoiler:
kode akhir seperti ini : - Code:
-
Public Class Form1 Dim detik, menit, jam As Integer Dim a As Boolean Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
If a = True Then Timer1.Start() a = False Else Timer1.Stop() a = True End If
End Sub
Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick If detik = 60 Then detik = 0 menit = menit + 1 End If If menit = 60 Then If detik = 0 Then detik = 0 menit = 0 jam = jam + 1 End If End If detik = detik + 1 Label1.Text = Format(jam, "00") & ":" & Format(menit, "00") & ":" & Format(detik, "00") End Sub
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Timer1.Enabled = False a = True End Sub End Class
maksudnya gk jelas giman bro | |
| | | Sponsored content
| Subject: Re: Membuat Stopwatch Di Visual Basic 2008 | |
| |
| | | | Membuat Stopwatch Di Visual Basic 2008 | |
|
Similar topics | |
|
| Permissions in this forum: | You cannot reply to topics in this forum
| |
| |
| |
|