Log inUsernamePassword
Log me on automatically each visit    
Register
Register
Log in to check your private messages
Log in to check your private messages
Visual Basic Forum for Visual Basic Programmers VB Forum Index » API

Post new topic   Reply to topic
help me with this project
View previous topic :: View next topic  
Author Message
yaps
Newbie


Joined: 05 Oct 2005
Posts: 1

PostPosted: Oct 5th, 2005 07:03 PM    Post subject: help me with this project Reply with quote

Your user interface will consist of 3 lables and 3 textboxes that will allow the user to enter an initial, final and step value. You will need to add two ListBox controls. The top ListBox will contain the titles for each of the columns (deg C deg F deg K deg R) while the listbox below will be used to hold all of the results of the calculations. Three buttons at the bottom of the display will be used to start the calculations, reset the default conditions and exit the program.

A list box control is useful for displaying data in a pseudo-tabular format. This display shown above actually has two separate listboxes; one for the headings (lstHead) and one for the data (lstOutput). The headings listbox has only a single line for the display. In order to get the data to line up in a list box you must use the TAB character between the columns. Since a TAB character is a non-printing character you must use the special symbol vbTab in your program. The code below illustrates how you would add the titles to the first ListBox in the Form_Load function. The Form1_Load function is called just before the form named Form1 gets displayed. If you have named your Form something other than Form1 you will need to change the name of the sub.

Note : that a space followed by an _ allows a line to be continued. This often makes it easier to read the line of code instead of having a really long line of code.

Private Sub frmLab3_Load(ByVal eventSender As System.Object, _ ByVal eventArgs As System.EventArgs) Handles MyBase.Load
lstHead.Items.Add("deg C" & vbTab & "deg F" & vbTab & _ "deg K" & vbTab & "deg R" & vbTab + "Notes")End Sub
This program presents temperatures using 4 different temperature scales. The Celcius scale will be used as the base scale for the calculations.

To perform the temperature conversions use the following equations:

F = C * 9 / 5 + 32.0
K = C + 273.16
R = F +459.69
Step 2 : Add a loop to your program that will perfom the above calculations for the user specified range and step values. You will need to add the output to the ListBox by using the lstOutput.Items.Add(...) method in the for loop.
You will also see that for a temperature of 0 deg C a note is shown that this is the Freezing point of water. You will see another note for the Boiling point. Make sure your program displays these notes at the appropriate locations as well. For this you will need to use a selection (IF) statement within the For Loop for your program.

Step 3 : Add the notes for the Boiling point and Melting point of H20 within the for loop


hey i really need to figure thi out. Am new in Vb. tnx your help will be appreciated
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Visual Basic Forum for Visual Basic Programmers VB Forum Index » API All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
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 vote in polls in this forum


Visual Basic Forum runs phpBB | Forum Template © iOptional
VB Resources | SSL | Visual Basic