In this posting I will write a simple VB programming tips "How to convert degree from Kelvin into Celcius, Fahrenheit and Rheamur" using VB6 programming. Let's go on to the simple tips. Your program will look like below coding:
We have three previous conversion formulas (Celcius base) as follow in the erlier postings:
Fahrenheit = ( Celcius X 1.8 ) + 32
Rheamur = Celcius X 0.8
Kelvin = Celcius + 273.15
From previous formulas we got another three formulas with Kelvin degree basis as the following:
Celcius = Kelvin - 273.15
Fahrenheit = ( ( Kelvin - 273.15 ) X 1.8 ) + 32
Rheamur = ( Kelvin - 273.15 ) X 0.8
Let's implement these formulas in a simple VB6 programming.
First you should create a screen design like below image (just a simple screen design):
How to create this screen design? Follow below instructions for the tips.
'conversion process
txtCelcius.Text = Val(txtKelvin.Text) - 273.15
txtRheamur.Text = (Val(txtKelvin.Text) - 273.15) * 0.8
txtFahrenheit.Text = ((Val(txtKelvin.Text) - 273.15) * 1.8) + 32
Private Sub cmdConvert_Click()
'conversion process
txtCelcius.Text = Val(txtKelvin.Text) - 273.15
txtRheamur.Text = (Val(txtKelvin.Text) - 273.15) * 0.8
txtFahrenheit.Text = ((Val(txtKelvin.Text) - 273.15) * 1.8) + 32
End Sub
Now the time to test your program.
Look at below image, and your result should look like it.
What about your idea? Any comment?
How to Convert Degree from Kelvin to Another in VB 6 Programming?
Subscribe to:
Post Comments (Atom)
Labels
- Stop Dreaming Start Action (1)
- Table of Contents (1)
- VB6 Programming (36)
- VB6 Sample Program (16)
3 comments:
Hi,
Thank you for your visit.
Thanks for post. It’s really imformative stuff.
I really like to read.Hope to learn a lot and have a nice experience here! my best regards guys!
--
rockstarbabu
--
seo jaipur--seo jaipur
Thank you for visiting my blog.
Post a Comment