Vous êtes sur la page 1sur 2

QUESTION 1 CODING FOR FORM:

Public Class Form1 Dim obj As New Circle Dim r As Integer Dim h As Integer Private Sub btnCylinder_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnCylinder.Click With obj r = txtRadius.Text h = txtHeight.Text txtKeputusan.Text = Val((2 * 3.142) * r * h) End With End Sub Private Sub btnCircle_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnCircle.Click With obj r = txtRadius.Text h = txtHeight.Text txtKeputusan.Text = Val(3.142 * r * r) End With End Sub Private Sub btnClear_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnClear.Click With obj txtRadius.Text = "" txtHeight.Text = "" txtKeputusan.Text = "" End With End Sub Private Sub Label3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Label3.Click End Sub Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load End Sub Private Sub txtRadius_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles txtRadius.TextChanged End Sub Private Sub txtHeight_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles txtHeight.TextChanged End Sub Private Sub txtKeputusan_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles txtKeputusan.TextChanged End Sub End Class

INTERFACE OUTPUT:

Vous aimerez peut-être aussi