.NET Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
User Name:
Password:
Remember me
 
Go Back   Dev Articles Community ForumsProgramming.NET Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Display Modes
 
Unread Dev Articles Community Forums Sponsor:
  #1  
Old September 14th, 2004, 12:53 AM
bravo659 bravo659 is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Sep 2004
Location: NYC
Posts: 2 bravo659 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 4 m 2 sec
Reputation Power: 0
Send a message via Yahoo to bravo659
Exclamation Heating Oil Calculator

I created a heating oil calculator. This little program tells you how much oil exist in your tank.
It also will tell you the total price once you enter the price per gallon. I find it to be a cool program.
The program is completed but not deployed or packaged. I have a textbox where a user can
enter the meter reading, which is in fractions. My program can only be used in decimal equivalent.
I would like to change that into using a fraction instead.
Here is the code :
The PreNumGal is where the user will enter the meter reading. I can only use the decimal equivalent in order to work.
I need to use a fraction rather than using the decimal. (e.g Not use 0.25, use 1/4) Can anyone help me.


PrivateSub btnCalculate_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnCalculate.Click

Dim NumGal, PriceGal, ExistNumGal, NumGalNeeded, TotPriceGal AsInteger

Dim PreNumGal AsShort

txtExistNumGal.Text = txtNumGal.Text * txtPreNumGal.Text

txtNumGalNeeded.Text = txtExistNumGal.Text - txtNumGal.Text

txtTotPriceGal.Text = txtNumGalNeeded.Text * txtPriceGal.Text

txtTotPriceGal.Text = Format(txtTotPriceGal.Text, "Currency")

txtPriceGal.Text = Format(txtPriceGal.Text, "Currency")

EndSub


Last edited by bravo659 : September 14th, 2004 at 12:56 AM. Reason: Mispelled word

Reply With Quote
Reply

Viewing: Dev Articles Community ForumsProgramming.NET Development > Heating Oil Calculator


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 4 hosted by Hostway
Stay green...Green IT