Solved

Order of operation

Posted on 1998-09-21
3
221 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
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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Need Delphi function to get Youtube video title 5 227
indy tidtcpclient threading issue 8 65
How to use Hashing sha1 in Delphi 2010 4 206
Newbie Thread Programming 1 139
The uses clause is one of those things that just tends to grow and grow. Most of the time this is in the main form, as it's from this form that all others are called. If you have a big application (including many forms), the uses clause in the in…
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 tutorial gives a high-level tour of the interface of Marketo (a marketing automation tool to help businesses track and engage prospective customers and drive them to purchase). You will see the main areas including Marketing Activities, Design …
Internet Business Fax to Email Made Easy - With  eFax Corporate (http://www.enterprise.efax.com), you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, f…

863 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

27 Experts available now in Live!

Get 1:1 Help Now