Solved

Order of operation

Posted on 1998-09-21
3
228 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

On Demand Webinar: Networking for the Cloud Era

Did you know SD-WANs can improve network connectivity? Check out this webinar to learn how an SD-WAN simplified, one-click tool can help you migrate and manage data in the cloud.

Question has a verified solution.

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

A lot of questions regard threads in Delphi.   One of the more specific questions is how to show progress of the thread.   Updating a progressbar from inside a thread is a mistake. A solution to this would be to send a synchronized message to the…
In this tutorial I will show you how to use the Windows Speech API in Delphi. I will only cover basic functions such as text to speech and controlling the speed of the speech. SAPI Installation First you need to install the SAPI type library, th…
Monitoring a network: how to monitor network services and why? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the philosophy behind service monitoring and why a handshake validation is critical in network monitoring. Software utilized …
In this video you will find out how to export Office 365 mailboxes using the built in eDiscovery tool. Bear in mind that although this method might be useful in some cases, using PST files as Office 365 backup is troublesome in a long run (more on t…
Suggested Courses
Course of the Month6 days, 5 hours left to enroll

627 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