Solved

Order of operation

Posted on 1998-09-21
3
218 Views
Last Modified: 2010-04-06
procedure TForm1.ComboBox6Change(Sender: TObject);
begin
case combobox6.itemindex of
0:label1.caption:=floattostr(strtofloat(edit1.text)*1.8+32);
1:label1.caption:=floattostr(strtofloat(edit1.text)-32*0.556);
end;{case}
end;
The first label1 works but not the second.
I have tried various combinations to get the Far to Cel
portion to work.(-32 is taken as a -ve)and the incorrect
result is calculated.Answer should be 37.8 C.
Any help would be appreciated.
Also how do you add a splash screen for a program when its
first launched...
0
Comment
Question by:frw
3 Comments
 
LVL 7

Accepted Solution

by:
BlackMan earned 50 total points
Comment Utility
Write the second line as:
1:label1.caption:=floattostr((strtofloat(edit1.text)-32)*0.556);
* has the highest priority so it will calculate 32*0.556 and subtract the result from edti1.text's value.
0
 

Expert Comment

by:sakya
Comment Utility
Hello.

There are some ways to display a splash windows.
See a next sample.

-------------------------
uses Unit2;

procedure TForm1.OnFormCreate;
begin
  Form2 := TForm2.Create(Appliation);//Form2 is Splash window
  Form2.Show;
  Form2.Update;

  {your procedure}

  Form2.Release;
end;
--------------

And you set Form2 to selectable form style(Sorry, I don't know
how to say in English. I have a Japanese Edition) in the project option.

And you change FormStyle to fsStayOnTop.

 
sakya

 

0
 
LVL 1

Expert Comment

by:pjdb
Comment Utility
For a project, put the plashscreen creation in the start of the project (after the application.intilize of the DPR mainprogram) an close/destroy the form either before the application.run of at the aend of the mainform onshow event.

JDB
0

Featured Post

Threat Intelligence Starter Resources

Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

Join & Write a Comment

Hello everybody This Article will show you how to validate number with TEdit control, What's the TEdit control? TEdit is a standard Windows edit control on a form, it allows to user to write, read and copy/paste single line of text. Usua…
In my programming career I have only very rarely run into situations where operator overloading would be of any use in my work.  Normally those situations involved math with either overly large numbers (hundreds of thousands of digits or accuracy re…
This video gives you a great overview about bandwidth monitoring with SNMP and WMI with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're looking for how to monitor bandwidth using netflow or packet s…
This video demonstrates how to create an example email signature rule for a department in a company using CodeTwo Exchange Rules. The signature will be inserted beneath users' latest emails in conversations and will be displayed in users' Sent Items…

763 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

14 Experts available now in Live!

Get 1:1 Help Now