# visual basic 2005 mortgage calculator

I need to write a mortgage calculator so that it displays a list of the total interest balance, monlthy payments, etc.  I dont want any straight answers, but any resources that will teach me how to do it.  I know you don't mean to answer homework questions, but I am new to this and simply don't know how to do it. and unfortunately this school does function to actually teach.  Therefore, if anyone knows of any valuable resouces that explain more complicated processes, please let me know.
``````Public Class Form1

Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Button1.Enabled = False
End Sub

Private Sub Button1_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Button1.Click

Dim Principle As Integer
Dim Rate As Integer
Dim Term As Integer

Dim MonthlyPayment As Integer

Dim mRate As Double
Dim mTerm As Double

Principle = Convert.ToString(Amount.Text)
Rate = Convert.ToString(iRate.Text)
Term = Convert.ToString(Years.Text)

mRate = Rate / (12 * 100)
mTerm = Term * 12
MonthlyPayment = (Principle * mRate) / (1 - ((1 + mRate) ^ -mTerm))

Label5.Text = MonthlyPayment.ToString("C")

End Sub

Private Sub TextBox1_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Amount.TextChanged
If Amount.Text.Length > 0 And iRate.Text.Length > 0 And Years.Text.Length > 0 Then
Button1.Enabled = True
Else
Button1.Enabled = False

End If

End Sub

Private Sub TextBox2_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles iRate.TextChanged
If Amount.Text.Length > 0 And iRate.Text.Length > 0 And Years.Text.Length > 0 Then
Button1.Enabled = True
Else
Button1.Enabled = False

End If
End Sub

Private Sub TextBox3_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Years.TextChanged
If Amount.Text.Length > 0 And iRate.Text.Length > 0 And Years.Text.Length > 0 Then
Button1.Enabled = True
Else
Button1.Enabled = False

End If
End Sub

Private Sub ListBox1_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ListBox1.SelectedIndexChanged

Dim Principle As Integer
Dim Rate As Integer
Dim Term As Integer

Dim MonthlyPayment As Integer

Dim mRate As Double
Dim mTerm As Double
Dim iPrinciple As Double
Dim TotalBalance As Double
Dim rbalance As Double

Principle = Convert.ToString(Amount.Text)
Rate = Convert.ToString(iRate.Text)
Term = Convert.ToString(Years.Text)
Principle = Convert.ToString(Amount.Text)
Rate = Convert.ToString(iRate.Text)
Term = Convert.ToString(Years.Text)

mRate = Rate / (12 * 100)
mTerm = Term * 12
MonthlyPayment = (Principle * mRate) / (1 - ((1 + mRate) ^ -mTerm))

End Sub
End Class
``````
.NET App Servers

Last Comment
SStory

8/22/2022 - Mon