Membuat Program Kalkulator Cinta menggunakan Microsoft Visual Basic 6.0
Membuat Program Kalkulator Cinta
menggunakan Microsoft Visual Basic
6.0
1
Buka aplikasi Microsoft Visual Basic 6.0 pada
PC/Laptop anda.
2.
New Project.
Pilih Standard EXE.
Kemudian klik OPEN.
3.
Buatlah Design program seperti dibawah ini :
4.
Untuk coding lengkapnya adalah sebagai berikut
:
Private Sub Command1_Click()
If Command1.Caption = "&Prosses" Then
If Text1.Text = "" Then
MsgBox "Anda Wajib Isikan Nama Anda",
vbInformation, ""
Text1.SetFocus
Exit Sub
End If
If Text2.Text = "" Then
MsgBox "Anda Wajib Mengisi Nama Pasangan
Anda", vbInformation, ""
Text2.SetFocus
Exit Sub
End If
Command1.Caption = "&Reset"
b = 0
Pasangan = UCase(Text1.Text & Text2.Text)
For i = 1 To Len(Pasangan)
b = b + Asc(Mid(Pasangan, i, 1))
Next
Label1.Caption = Right(b, 2) & " %"
ElseIf Command1.Caption = "&Reset" Then
Command1.Caption = "&Prosses"
Text1.Text = ""
Text2.Text = ""
Label1.Caption = "0 %"
Text1.SetFocus
End If
End Sub
Private Sub Form_Load()
Dim msg As String
msg = InputBox("Masukkan Nama Anda :",
"Masukkan Nama")
MsgBox "Hay... :)" + vbLf + msg & vbLf +
vbLf + "Temukan Kami Di: " +
vbLf + "www.jalanlayang.com, """
Text1.Text = Empty
Text2.Text = Empty
End Sub
Private Sub Form_MouseMove(Button As Integer, Shift As
Integer, X As Single, Y As Single)
Label4.ForeColor = vbBlack
End Sub
Private Sub Form_Unload(Cancel As Integer)
End
End Sub
Private Sub Label4_Click()
ShellExecute Me.hWnd, "open", "Created
By : F && N", vbNullString, vbNullString, 3
End Sub
Private Sub Label4_MouseMove(Button As Integer, Shift
As Integer, X As Single, Y As Single)
Label4.ForeColor = vbBlack
End Sub
Private Sub Picture1_Click()
End Sub
5.
Selamat mencoba kawan.. semoga penjelasan
diatas dapat bermanfaat dan mempermudah teman-teman semua dalam pembuatan
program.
Tetap
semangat, terus berusaha dan pantang menyerah !! Selamat belajar..
http://fitrifebriani26.blogspot.com
Komentar
Posting Komentar