Desainlah tampilan form seperni ini.
Pada grup INPUT DATA:
- Textboxt1 : TxtPanjang
- TextBox2 : TxtLebar
- CheckBox1 : ChkLuas
- CheckBox2 : ChkKeliling
- TextBox3 : TxtLuas
- TextBox4 : TxtKeliling
Public Class Persegi
Private Sub ChkLuas_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ChkLuas.CheckedChanged
If Me.ChkLuas.Checked = True Then
Me.LblLuas.Visible = True
Me.TxtLuas.Visible = True
Me.LblLuas.Text = "LUAS"
Me.TxtLuas.Text = Val(Me.TxtPanjang.Text) * Val(Me.TxtLebar.Text)
Else
Me.TxtLuas.Visible = False
Me.LblLuas.Visible = False
End If
End Sub
Private Sub ChkKeliling_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ChkKeliling.CheckedChanged
If Me.ChkKeliling.Checked = True Then
Me.LblKeliling.Visible = True
Me.TxtKeliling.Visible = True
Me.LblKeliling.Text = "KELILING"
Me.TxtKeliling.Text = Val(Me.TxtPanjang.Text) + Val(Me.TxtLebar.Text)
Else
Me.TxtKeliling.Visible = False
Me.LblKeliling.Visible = False
End If
End Sub
End Class
Untuk tutorial selanjutnya adalah Membuat Pemutar Musik dan Film Menggunakan Media Player, tetap mencoba (;
Posting Komentar