This question's due date has already passed. You may post a tutorial, but there's no guarantee that the original asker will purchase the tutorial. But other people might!

Question

$10.00 Create a GUI application using Visual C# for miles per gallon

Asked by :
blackcats
blackcats Not confirmed
Rating :No Rating
Questions Asked: 25
Tutorials Posted: 0
 
 
Q:
Create a GUI application using Visual C# that inputs miles driven and gallons used, and calculates miles per gallon. The example should use exception handling to process the FormatExceptions that occur when converting the strings in the TextBoxes to doubles. If invalid data is entered, a MessageBox should be displayed informing the user.
 

Available Tutorials to this Question
 
$20.00
Help Creating a miles per gallon GUI application in C#
  • This tutorial was purchased 1 time and rated No Rating by students like you.
  • Posted on Feb 12, 2009 at 4:12:00PM
Posted by :
b_h
b_h
Rating (723):A+
Questions Asked: 0
Tutorials Posted: 834,
Earned: $29,248.48
 
A:
Preview: ... ized by setting various properties associated with each control type. Here's how our default constructor is going to setup a Label control lblMilesDriven:<br><br><br><pre><br> // Sets up all the components in the GUI<br> private void MileageGUI()<br> {<br> . . .<br> //lblMilesDriven<br> this.lblMilesDriven.Location = new System.Drawing.Point(24, 32);<br> this.lblMilesDriven.Text = "Miles Driven";<br> . . .<br></pre><br><br><br><br>Here a Label control has two properties that we're interested in: Location and Text. The Location property specifies the x and y coordinates of the upper-left corner of this control relative to the main form. The Text property specifies what is displayed inside the Label.<br><br>A text box is configured similar to a label, as shown here:<br><br><br><pre><br> // txtMilesPerGallon<br> this.txtMilesPerGallon.Location = new System.Drawing.Point(152, 112);<br> this.txtMilesPerGallon.Text = "0";<br> // this TextBox will be read only since it will only display the result of a computation<br> this.txtMilesPerGallon.ReadOnly = true;<br></pre><br><br><br>Labels can't be edited by the user, but TextBox's can. TextBox has a new property called ReadOnly. If it is set to true then the user can select and copy the contents of the TextBox, but it cannot change it. By default they are editable (ReadOnly set to false).<br><br>The GUI we have in mind has three labels and three text boxes. Each Label says what is represented by a number in the neighboring textbox. The first two label/textbox pairs are going to be for the user input, and the final one is going to be for the calculat ...

The full tutorial is about 1215 words long plus attachments.

attachmentlogo

Attachments:
MileageGUI.txt (4K) (Preview)
MileageGUI.jpg (39K) (Preview)
 
$10.00
GUI application using Visual C#
  • This tutorial hasn't been purchased yet.
  • Posted on Feb 12, 2009 at 5:33:44PM
Posted by :
Albertom
Albertom
Rating (201):C+
Questions Asked: 0
Tutorials Posted: 1038,
Earned: $1,524.53
 
A:
Preview: ... numeric variables are m1, m2, and m3<br>The values read from the textboxes are converted to double by means of double. Parse (string)<br>and to ...

The full tutorial is about 278 words long plus attachments.

attachmentlogo

Attachments:
GUI.doc (34K) (Preview)
 
$10.00
Fully-working VC# 2008 project with tutorial documentation
  • This tutorial was purchased 2 times and rated A+ by students like you.
  • Posted on Feb. 13, 2009 at 03:39:32AM
Posted by :
nzpapillon
 
A:
Preview: ... should be in your Visual C# IDE and load the project "MilePerGallonCalculator.csproj" in subfolder<br>" ...

The full tutorial is about 68 words long plus attachments.

attachmentlogo

Attachments:
MilePerGallonCalculator.zip (63K)
MilesPerGallon_Code.txt (2K) (Preview)