Register    Login    Forum    Search    FAQ

Board index » Programming » All Other Programming Languages




 Page 1 of 1 [ 1 post ] 



Author Message
 Post subject: Program Help
 Post Posted: Wed Jan 30, 2013 2:09 pm 
Offline
Rookie
Rookie

Joined: Tue May 22, 2012 8:33 pm
Posts: 9
Languages: xhtml
Text editor: notepad++
I'm taking an intro to visual basic programming class, and my assignment is to create a program to calculate the volume of a rectangular pool. My problem is that everytime i run the program in the volume text box it comes up as 0 and not as the answer of the length * width * height here what my coding looks like i can't seem to figure out what i'm doing wrong.

vb code:
Public Class frmMain
 
    Private Property Volume As Integer
 
    Private Sub ExtButton_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles ExtButton.Click
        Me.Close()
 
    End Sub
 
    Private Sub CalButton_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles CalButton.Click
        'declare variables section
       Dim Height As Integer
        Dim Length As Integer
        Dim Width As Integer
        Dim Volume As Integer
 
        'assign input to variables
       Integer.TryParse(HeigTextBox.Text, Height)
        Integer.TryParse(LengTextBox.Text, Length)
        Integer.TryParse(WidTextBox.Text, Width)
        Integer.TryParse(VolLblBox.Text, Volume)
 
 
        'calculation with l/w/h section
       Volume = Length * Width * Height
 
 
        'display section
       VolLblBox.Text = Volume.ToString()
        VolLblBox.Focus()
 
    End Sub
 
    Private Function s() As String
        Throw New NotImplementedException
    End Function
 
    Private Function Length() As Integer
        Throw New NotImplementedException
    End Function
 
End Class


Top 
Display posts from previous:  Sort by  
 
 Page 1 of 1 [ 1 post ] 




Board index » Programming » All Other Programming Languages


Who is online

Users browsing this forum: Bing [Bot] and 1 guest

 
 

 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to: