Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Order of operation

Posted on 1998-09-21
3
Medium Priority
?
231 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 100 total points
ID: 1340506
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
ID: 1340507
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
ID: 1340508
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

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction I have seen many questions in this Delphi topic area where queries in threads are needed or suggested. I know bumped into a similar need. This article will address some of the concepts when dealing with a multithreaded delphi database…
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 summaries big data hadoop online training demo (http://onlineitguru.com/big-data-hadoop-online-training-placement.html) , and covers basics in big data hadoop .
We’ve all felt that sense of false security before—locking down external access to a database or component and feeling like we’ve done all we need to do to secure company data. But that feeling is fleeting. Attacks these days can happen in many w…
Suggested Courses

971 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