Advertisement
Drifting

Untitled

Dec 11th, 2013
55
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
VB.NET 1.37 KB | None | 0 0
  1. 'Jack McGrath'
  2. '12/12/13'
  3.  
  4. Public Class Form1
  5.     'Form Load
  6.     Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
  7.         txtarea.Visible = False
  8.         txtcirc.Visible = False
  9.         lblarea.Visible = False
  10.         lblcirc.Visible = False
  11.  
  12.     End Sub
  13.  
  14.     Private Sub btnarea_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnarea.Click
  15.         txtarea.Visible = True
  16.         lblarea.Visible = True
  17.         btncirc.Visible = False
  18.     End Sub
  19.  
  20.     Private Sub btncirc_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btncirc.Click
  21.         txtcirc.Visible = True
  22.         lblcirc.Visible = True
  23.         btnarea.Visible = False
  24.     End Sub
  25.     'Area Answer'
  26.     Private Sub txtarea_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles txtarea.TextChanged
  27.         Dim intarea As Integer
  28.         intarea = txtarea.Text
  29.         lblarea.Text = intarea ^ 2 * 3.14159265359
  30.         intarea = 3.14159265359
  31.  
  32.     End Sub
  33.     'Circumference Answer'
  34.     Private Sub txtcirc_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles txtcirc.TextChanged
  35.         Dim intcirc As Integer
  36.         intcirc = txtcirc.Text
  37.         lblcirc.Text = intcirc * 2 * 3.14159265359
  38.         intcirc = 3.14159265359
  39.     End Sub
  40. End Class
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement