Laman

Selasa, 30 Agustus 2016

CARA MEMBUAT PROGRAM MATEMATIKA

Membuat Program Matematika dengan Visual Basic 6.0


Sahabat pena, kali ini saya akan menjelaskan bagaimana cara membuat program matematika di dalam software visual basic versi 6.0, untuk lebih jelasnya mari ikuti langkah - langkah dibawah ini :


1. Buka visual basic versi 6.0, setelah itu maka akan muncul tampilan seperti  ini :




2.  Tambahkan frame, seperti pada gambar : 


3. Tambahkan Label di tengah-tengah frame dan tulis di Label "Program Matematika" : 





4. Setelah itu tambahkan frame lagi sekaligus Label, TextBox, Dan CommandButton kayak bgini :





5. Kalau sudah jadi tambah lagi frame, label, TextBox, dan CommandButton hingga tampilan seperti ini :
 6. Jika sudah beres semuanya seperti gambar   diatas agan copas source code di bawah ini :
Private Sub Command1_Click()
Text2.Text = Val(Text1.Text) * Val(Text1.Text)
End Sub
Private Sub Command2_Click()
Text6.Text = 0.5 * (Val(Text3.Text) + Val(Text4.Text)) * Val(Text5.Text)
End Sub
Private Sub Command3_Click()
Text8.Text = 3.14 * (Val(Text7.Text) * Val(Text7.Text))
End Sub
Private Sub Command4_Click()
Text11.Text = Val(Text9.Text) * Val(Text10.Text)
End Sub
Private Sub Command5_Click()
Text14.Text = Val(Text12.Text) * Val(Text13.Text)
End Sub
Private Sub Command6_Click()
Text17.Text = 0.5 * (Val(Text15.Text) * Val(Text16.Text))
End Sub
Private Sub Command7_Click()
Text20.Text = 0.5 * (Val(Text18.Text) * Val(Text19.Text))
End Sub
Private Sub Command10_Click()
Text24.Text = Val(Text21.Text) * Val(Text22.Text) * Val(Text23.Text)
End Sub
Private Sub Command11_Click()
Text28.Text = 2 * (Val(Text25.Text) * Val(Text26.Text) + Val(Text25.Text) * Val(Text27.Text) + Val(Text27.Text) * Val(Text26.Text))
End Sub
Private Sub Command12_Click()
Text31.Text = 3.14 * Val(Text29.Text) * Val(Text29.Text) * Val(Text30.Text)
End Sub
Private Sub Command13_Click()
Text34.Text = 6.28 * Val(Text32.Text) * (Val(Text32.Text) + Val(Text33.Text))
End Sub
Private Sub Command8_Click()
Text1.Text = ""
Text2.Text = ""
Text3.Text = ""
Text4.Text = ""
Text5.Text = ""
Text6.Text = ""
Text7.Text = ""
Text8.Text = ""
Text9.Text = ""
Text10.Text = ""
Text11.Text = ""
Text12.Text = ""
Text13.Text = ""
Text14.Text = ""
Text15.Text = ""
Text17.Text = ""
Text18.Text = ""
Text19.Text = ""
Text20.Text = ""
Text21.Text = ""
Text22.Text = ""
Text23.Text = ""
Text24.Text = ""
Text25.Text = ""
Text26.Text = ""
Text27.Text = ""
Text28.Text = ""
Text29.Text = ""
Text30.Text = ""
Text31.Text = ""
Text32.Text = ""
Text33.Text = ""
Text34.Text = ""
End Sub
Private Sub Command9_Click()
End
End Sub
~~Silahkan Mencoba dan Semoga Sukses ;) ---

Tidak ada komentar:

Posting Komentar