Monday, September 9, 2019

HOW TO CALCULATE CIRCUMFERENCE OF CIRCLE USING VB PROGRAMMING.

Hi Friends Today i will show you how you can be Calculate Circumference of Circle in VB(Visual Basic 6.0)


  • To Calculate Circumference of Circle you need to insert Two Label Control's.
  • And another Control's need to insert is  One Text box Control.
  • One Command button is placed to the form.
  • As Shown in Picture Arrange it.
  • The Second Label for Output or Display of Calculate Circumference of Circle. 
  • In this Example I used default names of Control.  
  • Also we concatenate the Strings value to show proper Output in Label Control. 

Coding of Area of Circumference

Private Sub cmdClick_Click()
Dim r As Integer
Dim circum As Double
r = Val(Text1.Text)
circum = 2 * 3.14 * r
Label2.Caption = "Circumference of Circle is " & circum
End Sub
Code Window

Output View

Design View

No comments:

Post a Comment