Welcome Guest [Log In] [Register]
Team SILO Forum

Forum Quick Links

Forum Rules

Staff Team

Introduce Yourself

Team SILO Wiki

Main Page


Follow Us!

Twitter

Facebook

Stumble Upon

Delicious

Digg

Myspace

Youtube
Video Of The Month


[ Click Here! ] For Full Download and Feedback


Team SILO Lead Staff

[DemonDog]
Founder/Lead Designer/Admin

[Vulcan]
Founder/Global Moderator

[HJKDillon]
Global Moderator

[Reapertura]
Global Moderator

[hawksghetto]
Global Moderator


AV Team

[xXd34thm3t4131fXx]

Welcome to Team SILO. We hope you enjoy your visit.


You're currently viewing our forum as a guest. This means you are limited to certain areas of the board and there are some features you can't use. If you join our community, you'll be able to access member-only sections, and use many member-only features such as customizing your profile, sending personal messages, and voting in polls. Registration is simple, fast, and completely free.


Join our community!


If you're already a member please log in to your account to access all of our features:

Username:   Password:
Add Reply
Circle Calculator Project; ~Completed~
Topic Started: Mar 13 2010, 11:06 AM (464 Views)
DemonDog
Member Avatar
~Speedy Silence~
' Name: Chapter 3 - Circle Calculator Project
' Purpose: Calculates the perimeter and area
' of a circle when given the radius.
' Programmer: Jonathan Horton on 4/5/10
' I)emon I)og

Option Explicit On
Option Strict On
Option Infer Off

Public Class frmMain_jwh

'Loads the application
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load

End Sub

'Performs Calculations when clicked
Private Sub btnCalc_jwh_Click_1(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnCalc_jwh.Click

'Declares constants and variables
Const decPi As Decimal = 3.14D
Dim decRadius As Decimal
Dim decArea As Decimal
Dim decPerimeter As Decimal

'Converts Radius to a decimal
Decimal.TryParse(txtRadius_jwh.Text, decRadius)

'Circle Equation Calculations
decArea = decPi * decRadius * decRadius
decPerimeter = 2 * decPi * decRadius

'Converts Area and Perimeter and Outputs Data
lblAreaBox_jwh.Text = decArea.ToString("N2")
lblPerimeterBox_jwh.Text = decPerimeter.ToString("N2")

End Sub

'Clears all entries when clicked
Private Sub btnClear_cdh_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnClear_jwh.Click
'Empties all of the "Text Boxes" and "Labels".
lblAreaBox_jwh.Text = String.Empty
lblPerimeterBox_jwh.Text = String.Empty
txtRadius_jwh.Text = String.Empty
'It sets the mouse/pointer to the "txtRadius_jwh" text field.
txtRadius_jwh.Focus()
End Sub

'Exits the application when clicked.
Private Sub btnExit_jwh_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnExit_jwh.Click
'Closes the Application "Me" closes the form.
Me.Close()
End Sub

'Empties all fields when text value of Radius is changed
Private Sub txtRadius_jwh_TextChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles txtRadius_jwh.TextChanged
'When text is changed in the "txtRadius" box the two labels are emptied.
lblAreaBox_jwh.Text = String.Empty
lblPerimeterBox_jwh.Text = String.Empty
End Sub

'Plays the theme song using Windows Media Player
Private Sub medTheme_jwh_Enter(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles medTheme_jwh.Enter
'Some symbol or something to the URL location might fix my problem. E.G. Music\*.mp3
'That way it just plays things with .mp3 extension
'Dim song As New WMPLib.WMPPlaylistCtrl
'medTheme_jwh.currentPlaylist.appendItem(song)
End Sub

'When the animated "Demon Dog" GIF is clicked...opens a browser and goes to ccpsd.org/jonathan
Private Sub PicDemonDog_jwh_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles picDemonDog_jwh.Click
System.Diagnostics.Process.Start("http://www.ccpsd.org/jonathan")
End Sub

'Makes the Forum Label direct you to my forum website when clicked
Private Sub lblforum_jwh_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles lblforum_jwh.Click
System.Diagnostics.Process.Start("http://s1.zetaboards.com/TeamSILO")
End Sub

Private Sub lblwebsite_jwh_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles lblwebsite_jwh.Click
System.Diagnostics.Process.Start("http://www.ccpsd.org/jonathan")
End Sub
Posted Image

Youtube Channel
Offline Profile Quote Post Goto Top
 
1 user reading this topic (1 Guest and 0 Anonymous)
« Previous Topic · VB.Net Examples · Next Topic »
Add Reply

Share on: Share to Facebook | Share on Bebo | Post to MySpace! | | Post to Delicious! | StumbleUpon

Quote of the Moment


Team SILO Affiliates [ Click to Affiliate ] [ Show All Affiliates ]

Please support us by clicking our vote buttons everyday!
Video Games - Forum Top Sites Forum Topsite Forum Champ VoteForums.com / Forum Topsites, promote your forums, number one forum, best forums, Forum Topsite! Game Sites 50

|Forum Promotion|Add Your Link In|Video Game Forum|

Theme Designed by McKee91
Forum Elements used from Brawl Domain