Membuat Database

You might also like

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 6

1.

Membuat Database

2. Membuat Form pertama


3. Membuat Form kedua

4. Tampilan setelah di play


TUGAS PROGRAM DAN APLIKASI KOMPUTER
APLIKASI RUMUS ABC

OLEH
NAMA : Aprillianto
NIM: 03021281722078
KELAS : B

JURUSAN TEKNIK PERTAMBANGAN


FAKULTAS TEKNIK
UNIVERSITAS SRIWIJAYA
2018
Public Class Form1
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)
Handles Button1.Click
Dim a, b, c As Double
a = txta.Text
b = txtb.Text
c = txtc.Text
txtX1.Text = (-(b) + (Math.Sqrt((b * b) - (4 * a * c)))) / 2 * a

End Sub

Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)


Handles Button2.Click
Dim a, b, c As Double
a = txta.Text
b = txtb.Text
c = txtc.Text
txtX2.Text = (-(b) - (Math.Sqrt((b * b) - (4 * a * c)))) / 2 * a
End Sub

Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)


Handles Button3.Click
Dim a, b, c, det As Double
a = txta.Text
b = txtb.Text
c = txtc.Text
Det = (b * b) - (4 * a * c)
If det > 0 Then
txtD.Text = det
Label8.Text = "Dua akar real berlainan"
ElseIf det = 0 Then
txtD.Text = det
Label8.Text = "Dua akar real sama"
ElseIf det < 0 Then
txtD.Text = det
Label8.Text = " Akar Tidak Real"
End If
End Sub

Private Sub Button4_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)


Handles Button4.Click
txta.Text = ""
txtb.Text = ""
txtc.Text = ""
txtD.Text = ""
txtX1.Text = ""
txtX2.Text = ""
End Sub

Private Sub Button5_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)


Handles Button5.Click
Me.Close()
End Sub

Private Sub GroupBox3_Enter(ByVal sender As System.Object, ByVal e As


System.EventArgs)
If txta.Text = "" Or txtb.Text = "" Or txtc.Text = "" Then
MsgBox("Mohon Semua Variabel di Isi", vbInformation, "Informasi")
End If
End Sub

Private Sub txtb_TextChanged(ByVal sender As System.Object, ByVal e As


System.EventArgs) Handles txtb.TextChanged

End Sub

Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs)


Handles MyBase.Load

End Sub

Private Sub Label8_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)


Handles Label8.Click

End Sub

Private Sub Label3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)


Handles Label3.Click

End Sub

Private Sub txta_TextChanged(ByVal sender As System.Object, ByVal e As


System.EventArgs) Handles txta.TextChanged

End Sub

Private Sub txtX1_TextChanged(ByVal sender As System.Object, ByVal e As


System.EventArgs) Handles txtX1.TextChanged

End Sub
End Class

You might also like