Popular Post

Popular Posts

About

Recent post


Nah pada postingan kali ini kita akan mencoba mebuat sebuah kalkulator Cinta dengan Visual Basic 2008. Oh iya kalkulator ini fungsinya untuk menghitung kira-kira seberapa besarkah cinta si dia padamu lho!!!. He he he …jangan ditanggapi serius ya. Program ini hanya untuk iseng-iseng aja, tapi lumayan lah untuk sekedar main-main ….. Nah berikut ini tampilannya kalau sudah jadi :

 

Berikut ini langkah-langkah membuat kalkulator cinta dengan Visual Basic 2008 :

1. Pastikan  PC anda telah  terinstal Microsoft Visual Basic 2008
2. Lalu buka Start-Progam-Microsoft Visual  Basic 2008 Express Edition

 

3.  Akan ada Tampilan utama, klik Project pada Create: Project, pilih Windows Form Application, ketik nama project dengan nama Kalkulator cinta, klik OK untuk memulai.

 

  4. Setelah klik open,akan tampak tampilan form1 untuk memulai aplikasi.

 

5. Buatlah 2 Label, 2 Tabel, 3 Command Button (Button), dan 2 Picture Box, seperti gambar dibawah ini :

 

6. Aturlah masing - masing tollbar seperti dibawah ini :

   Properties :

   1. Form :
  Caption (Text)                    : Kalkulator Cinta
  Size                                     : 420, 300
  BackgroundImage             : (Sesuai yang anda inginkan)
  BackgroundImageLayout : Stretch
  Icon                                      :  (Sesuai yang anda inginkan)

  2. Text Box1 :
  Caption (Text) :
  Size                   : 287, 26
  Location           : 12, 61

  3. Text Box2 :
  Caption (text) :
  Size                 : 345, 29
  Location          : 12, 156

  4. Label1 :
  Caption (Text) : Nama Cowok
  Size                   : 287, 25
  Location           : 7, 9
  FontColor         : (Sesuai yang anda inginkan)

  5. Label2 :
  Caption (Text) : Nama Cewek
  Size                   : 287, 25
  Location            : 7, 104
  FontColor         : (Sesuai yang anda inginkan)

  6. Command Button1 (Button) :
  Caption (Text) : Hitung
  Size                   : 73, 43
  Location            : 12, 192
  BackColor         : (Sesuai yang anda inginkan)

  7. Command Button2 (Button) :
  Caption (Text) :  Hapus
  Size                   : 73, 43
  Location           : 118, 192
  BackColor         : (Sesuai yang anda inginkan)

  8. Command Button3 (Button) :
  Caption (Text) : Keluar
  Size                   : 73, 43
  Location            : 221, 192
  BackColor         : (Sesuai yang anda inginkan)

  9. Picture Box1 :
  Size                         : 80, 80
  Location                  : 318, 36
  BackgroundImage : (Sesuai yang anda inginkan)

10. Picture Box2 :
  Size                         :  80, 80
  Location                  : 318, 134
  BackgroundImage : (Sesuai yang anda inginkan)Properties :

   1. Form :
  Caption (Text)                    : Kalkulator Cinta
  Size                                     : 420, 300
  BackgroundImage             : (Sesuai yang anda inginkan)
  BackgroundImageLayout : Stretch
  Icon                                      :  (Sesuai yang anda inginkan)

  2. Text Box1 :
  Caption (Text) :
  Size                   : 287, 26
  Location           : 12, 61

  3. Text Box2 :
  Caption (text) :
  Size                 : 345, 29
  Location          : 12, 156

  4. Label1 :
  Caption (Text) : Nama Cowok
  Size                   : 287, 25
  Location           : 7, 9
  FontColor         : (Sesuai yang anda inginkan)

  5. Label2 :
  Caption (Text) : Nama Cewek
  Size                   : 287, 25
  Location            : 7, 104
  FontColor         : (Sesuai yang anda inginkan)

  6. Command Button1 (Button) :
  Caption (Text) : Hitung
  Size                   : 73, 43
  Location            : 12, 192
  BackColor         : (Sesuai yang anda inginkan)

  7. Command Button2 (Button) :
  Caption (Text) :  Hapus
  Size                   : 73, 43
  Location           : 118, 192
  BackColor         : (Sesuai yang anda inginkan)

  8. Command Button3 (Button) :
  Caption (Text) : Keluar
  Size                   : 73, 43
  Location            : 221, 192
  BackColor         : (Sesuai yang anda inginkan)

  9. Picture Box1 :
  Size                         : 80, 80
  Location                  : 318, 36
  BackgroundImage : (Sesuai yang anda inginkan)

10. Picture Box2 :
  Size                         :  80, 80
  Location                  : 318, 134
  BackgroundImage : (Sesuai yang anda inginkan)Properties :

   1. Form :
  Caption (Text)                    : Kalkulator Cinta
  Size                                     : 420, 300
  BackgroundImage             : (Sesuai yang anda inginkan)
  BackgroundImageLayout : Stretch
  Icon                                      :  (Sesuai yang anda inginkan)

  2. Text Box1 :
  Caption (Text) :
  Size                   : 287, 26
  Location           : 12, 61

  3. Text Box2 :
  Caption (text) :
  Size                 : 345, 29
  Location          : 12, 156

  4. Label1 :
  Caption (Text) : Nama Cowok
  Size                   : 287, 25
  Location           : 7, 9
  FontColor         : (Sesuai yang anda inginkan)

  5. Label2 :
  Caption (Text) : Nama Cewek
  Size                   : 287, 25
  Location            : 7, 104
  FontColor         : (Sesuai yang anda inginkan)

  6. Command Button1 (Button) :
  Caption (Text) : Hitung
  Size                   : 73, 43
  Location            : 12, 192
  BackColor         : (Sesuai yang anda inginkan)

  7. Command Button2 (Button) :
  Caption (Text) :  Hapus
  Size                   : 73, 43
  Location           : 118, 192
  BackColor         : (Sesuai yang anda inginkan)

  8. Command Button3 (Button) :
  Caption (Text) : Keluar
  Size                   : 73, 43
  Location            : 221, 192
  BackColor         : (Sesuai yang anda inginkan)

  9. Picture Box1 :
  Size                         : 80, 80
  Location                  : 318, 36
  BackgroundImage : (Sesuai yang anda inginkan)

10. Picture Box2 :
  Size                         :  80, 80
  Location                  : 318, 134
  BackgroundImage : (Sesuai yang anda inginkan)Properties :

   1. Form :
  Caption (Text)                    : Kalkulator Cinta
  Size                                     : 420, 300
  BackgroundImage             : (Sesuai yang anda inginkan)
  BackgroundImageLayout : Stretch
  Icon                                      :  (Sesuai yang anda inginkan)

  2. Text Box1 :
  Caption (Text) :
  Size                   : 287, 26
  Location           : 12, 61

  3. Text Box2 :
  Caption (text) :
  Size                 : 345, 29
  Location          : 12, 156

  4. Label1 :
  Caption (Text) : Nama Cowok
  Size                   : 287, 25
  Location           : 7, 9
  FontColor         : (Sesuai yang anda inginkan)

  5. Label2 :
  Caption (Text) : Nama Cewek
  Size                   : 287, 25
  Location            : 7, 104
  FontColor         : (Sesuai yang anda inginkan)

  6. Command Button1 (Button) :
  Caption (Text) : Hitung
  Size                   : 73, 43
  Location            : 12, 192
  BackColor         : (Sesuai yang anda inginkan)

  7. Command Button2 (Button) :
  Caption (Text) :  Hapus
  Size                   : 73, 43
  Location           : 118, 192
  BackColor         : (Sesuai yang anda inginkan)

  8. Command Button3 (Button) :
  Caption (Text) : Keluar
  Size                   : 73, 43
  Location            : 221, 192
  BackColor         : (Sesuai yang anda inginkan)

  9. Picture Box1 :
  Size                         : 80, 80
  Location                  : 318, 36
  BackgroundImage : (Sesuai yang anda inginkan)

10. Picture Box2 :
  Size                         :  80, 80
  Location                  : 318, 134
  BackgroundImage : (Sesuai yang anda inginkan)Properties :

   1. Form :
  Caption (Text)                    : Kalkulator Cinta
  Size                                     : 420, 300
  BackgroundImage             : (Sesuai yang anda inginkan)
  BackgroundImageLayout : Stretch
  Icon                                      :  (Sesuai yang anda inginkan)

  2. Text Box1 :
  Caption (Text) :
  Size                   : 287, 26
  Location           : 12, 61

  3. Text Box2 :
  Caption (text) :
  Size                 : 345, 29
  Location          : 12, 156

  4. Label1 :
  Caption (Text) : Nama Cowok
  Size                   : 287, 25
  Location           : 7, 9
  FontColor         : (Sesuai yang anda inginkan)

  5. Label2 :
  Caption (Text) : Nama Cewek
  Size                   : 287, 25
  Location            : 7, 104
  FontColor         : (Sesuai yang anda inginkan)

  6. Command Button1 (Button) :
  Caption (Text) : Hitung
  Size                   : 73, 43
  Location            : 12, 192
  BackColor         : (Sesuai yang anda inginkan)

  7. Command Button2 (Button) :
  Caption (Text) :  Hapus
  Size                   : 73, 43
  Location           : 118, 192
  BackColor         : (Sesuai yang anda inginkan)

  8. Command Button3 (Button) :
  Caption (Text) : Keluar
  Size                   : 73, 43
  Location            : 221, 192
  BackColor         : (Sesuai yang anda inginkan)

  9. Picture Box1 :
  Size                         : 80, 80
  Location                  : 318, 36
  BackgroundImage : (Sesuai yang anda inginkan)

10. Picture Box2 :
  Size                         :  80, 80
  Location                  : 318, 134
  BackgroundImage : (Sesuai yang anda inginkan)



7. Setelah diatur maka akan menjadi seperti gambar dibawah ini :

 

8. Berikutnya masukkan script code dibawah ini dengan cara berikut ini :

  1. Klik kanan pada Label1, lalu klik View Code.

 

  2. Maka akan muncul form1.vb* seperti gambar berikut ini :

 

  3. Setelah itu hapus semua script code yang ada di form1.vb*.

 


  4. Selanjutnya copy script code dibawah ini lalu paste ke dalam Form1.vb*, seperti gambar berikut ini.

Option Strict Off
Option Explicit On
Imports VB = Microsoft.VisualBasic
Friend Class Form1
 Inherits System.Windows.Forms.Form

 'www.rudymaturbongs.blogspot.com
 Private Sub Command1_Click(ByVal eventSender As System.Object, ByVal eventArgs As System.EventArgs) Handles Command1.Click
  Dim sBuffer As String
  Dim sBuffer2 As String
  Dim nCowokLen As Short
  Dim nCewekLen As Short
  Dim nCtr As Short
  Dim nCtr2 As Short
  Dim nTotalLen As Short
  Dim nJumlah As Short
  Dim c As String
  Dim c1 As String
  Dim BoolExit As Boolean
  Dim nKomentar As String
  If Len(Text1.Text) <= 0 Then MsgBox("Silahkan masukkan nama cowoknya", MsgBoxStyle.Information) : Text1.Focus() : Exit Sub
  If Len(Text2.Text) <= 0 Then MsgBox("Silahkan masukkan nama ceweknya", MsgBoxStyle.Information) : Text2.Focus() : Exit Sub
 
 
  Text1.Text = Trim(Text1.Text)
  Text2.Text = Trim(Text2.Text)
  nCowokLen = Len(Text1.Text)
  nCewekLen = Len(Text2.Text)
 
 
  sBuffer = UCase(Text1.Text) & "LOVES" & UCase(Text2.Text)
  nTotalLen = Len(sBuffer)
 
  For nCtr = 1 To nTotalLen
   nJumlah = 1
   If nCtr = nTotalLen And Mid(sBuffer, nCtr, 1) = Chr(255) Then BoolExit = True
   For nCtr2 = nCtr + 1 To nTotalLen
    If Mid(sBuffer, nCtr, 1) = Chr(255) Then BoolExit = True : Exit For
    If Mid(sBuffer, nCtr, 1) = Mid(sBuffer, nCtr2, 1) Then
     Mid(sBuffer, nCtr2, 1) = Chr(255)
     nJumlah = nJumlah + 1
    End If
   Next nCtr2
   If nJumlah = 0 Then nJumlah = 1
   If BoolExit = True Then
    BoolExit = False
   Else
    sBuffer2 = sBuffer2 & nJumlah
    Mid(sBuffer, nCtr, 1) = Chr(255)
   End If
   System.Windows.Forms.Application.DoEvents()
  Next nCtr
 
  Do
   sBuffer = sBuffer2
   sBuffer2 = ""
   nTotalLen = Len(sBuffer)
   If nTotalLen <= 2 Then Exit Do
   Do
    c = CStr(CShort(VB.Left(sBuffer, 1)))
    c1 = CStr(CShort(VB.Right(sBuffer, 1)))
    sBuffer2 = sBuffer2 & CShort(c) + CShort(c1)
    sBuffer = Mid(sBuffer, 2, nTotalLen - 2)
    nTotalLen = Len(sBuffer)
   Loop While Not Len(sBuffer) <= 1
   If Len(sBuffer) = 1 Then sBuffer2 = sBuffer2 & sBuffer
  Loop While Not Len(sBuffer2) <= 1
  If CShort(sBuffer) < 25 Then
   nKomentar = "Coba cewek yang lain."
  End If
  If Diantara(CShort(sBuffer), 25, 50) Then
   nKomentar = "Cukup."
  End If
  If Diantara(CShort(sBuffer), 50, 75) Then
   nKomentar = "Ini baik."
  End If
  If Diantara(CShort(sBuffer), 75, 100) Then
   nKomentar = "Luar biasa!!."
  End If
 
  MsgBox(Text1.Text & " mencintai " & Text2.Text & " sebesar " & sBuffer & " %", MsgBoxStyle.Information, nKomentar)
 End Sub

 Private Function Diantara(ByRef nNomor As Short, ByRef nPertama As Short, ByRef nKedua As Short, Optional ByRef BoundIncluded As Boolean = False) As Boolean
  If BoundIncluded = True Then
   If nNomor >= nPertama And nNomor <= nKedua Then
    Diantara = True
   Else
    Diantara = False
   End If
  Else
   If nNomor > nPertama And nNomor < nKedua Then
    Diantara = True
   Else
    Diantara = False
   End If
  End If
 End Function

 Private Sub Command2_Click(ByVal eventSender As System.Object, ByVal eventArgs As System.EventArgs) Handles Command2.Click
  End
 End Sub

 Private Sub Command3_Click(ByVal eventSender As System.Object, ByVal eventArgs As System.EventArgs) Handles Command3.Click
  Text1.Text = ""
  Text2.Text = ""
 End Sub

End Class

 

  5. Setelah di paste maka akan menjadi seperti gambar dibawah ini :


     6. Sekarang sudah selasai. Untuk mencobanya klik Start Debugging pada toolbar, seperti gambar berikut ini :
 

7. Maka akan muncul aplication kalkulator Cinta yang telah anda buat, seperti gambar berikut ini :


    8. Untuk Mencobanya, ketik Nama Cowok (Misalnya : Anto)pada text box1, lalu ketik Nama Cewek (Misalnya : Rima) pada text box2, kemudian klik hitung untuk mengetahui berapa cinta  kalian. 
 

9. Untuk menyimpan Kalkulator anda klik Save All pada toolbar.
 

  10.  A. Simpan file dengan properties :
  Name: Kalkulator Cinta
  Location : D:\
  Solution  Name: Kalkulator Cinta
         B. Lalu klik Save.
 

  11. Sekarang buka file yang sudah disimpan (D:\Kalkulator Cinta\Kalkulator Cinta\bin\Debug).

  
12. Maka akan muncul Kalkulator yang sudah anda buat.

 

  13. Cobalah ketik Nama Cowok (Misalnya : Anto)pada text box1, lalu ketik Nama Cewek (Misalnya : Rima) pada text box2, kemudian klik hitung untuk mengetahui berapa cinta  kalian.
 

 14. Sekarang Kalkulator Cinta yang anda buat sudah selesai.

  Terima Kasih.



Anda dapat Mendownload Kalkulator Cinta dengan mengklik link dibawah ini :
http://www.mediafire.com/?842vghv8yev8sx1
Password : kalkulator cinta
Anda juga dapat Mendownload Kalkulator dengan mengklik link dibawah ini :
http://www.mediafire.com/?zj41vvw02n2s8w3
Password : kalkulator


Lihat Facebook saya :
http://www.facebook.com/diposamar1


Lihat Twitter saya :
https://twitter.com/diposamar1

Alamat E-Mail saya :
1. Justinus.dipo.nugroho@gmail.com
2. diposamar1@rocketmail.com
3. diposamar1@hotmail.com
  

Cara Membuat Kalkulator Cinta Dengan Visual Basic 2008

- Copyright © 2013 Cara Membuat Kalkulator cinta Dengan Visual Basic 2008 - Kurumi Tokisaki - Powered by Blogger - Designed by Johanes Djogan -