Interest Calculator - Page 2

[Back to Page 1]

Change the Title of the Form

To get back to the form design view, click on the tab at the top that says Form1.vb [Design] Change the caption of the form by clicking anywhere on the form, then editing the Text in the Properties window:

Change it to say Interest Calculator (or use your name, like Matthew's Interest Calculator).

 

Add a bunch of Labels and Text Boxes

Add several labels and text boxes. Add these like you added the Button. Click on  to make a new label. That's just text on the form. Click on  to create a new textbox. Make your form look like this:

Use the Properties windows to change the (Name) of each textbox, and to change the Text property to be empty. The textboxes should have the following names (top to bottom): txtRate, txtTerm, txtInvest, txtEnding. Also, change the Text of the new button to be Compute Interest, and the (Name) to be cmdCompute.

Add Code to the Compute Interest Button

Now, add some code to the Compute Interest button. To do this, double-click on the button, and add the following code to the window that shows up:

Compile the Program

Try running your program. If it's working properly, you should be able to type in the 8, 10, and 1000, then click Compute Interest and get an answer like this:

The final step is to "compile" this program. This will make your program into an .EXE file, which then can be run independently, without Visual Basic. From the Build menu, choose Build Interest Calc:
This creates a folder called bin.  Inside that folder, there will be a file named InterestCalc.exe. Email me this file as an attachment to complete the homework.


(InterestCalc.exe looks like this)

[Back to Page 1]