?
Solved

MessageDlg wrong delphi type?

Posted on 2011-03-02
5
Medium Priority
?
1,313 Views
Last Modified: 2012-05-11
MessageDlg(myinfo.totret, mtInformation, [mbOK], 0, mbOK);

Open in new window


myinfo.totret is type double

I get the following error:

There is no overload version of 'MessageDlg' that can be called with these arguments. I think it's because I'm using type double instead of type string in the MessageDlg code, not sure the easiest way to convert?

Thanks,
0
Comment
Question by:keats88
[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
5 Comments
 
LVL 32

Expert Comment

by:Ephraim Wangoya
ID: 35018334

it needs a string

MessageDlg(FloatToStr(myinfo.totret), mtInformation, [mbOK], 0, mbOK)
0
 
LVL 32

Accepted Solution

by:
Ephraim Wangoya earned 1000 total points
ID: 35018364
Remove the last mbOK

Change this to
MessageDlg(FloatToStr(myinfo.totret), mtInformation, [mbOK], 0)

Open in new window

0
 

Author Comment

by:keats88
ID: 35018375
Perfect, thank you! This is my first attempt at a language that is strongly typed and it's presenting me some head aches, but will make my code better in the long run I suppose.
0
 
LVL 32

Expert Comment

by:Ephraim Wangoya
ID: 35018387

Practice makes perfect, just hang in there
0
 
LVL 3

Expert Comment

by:KoenVandemoortel
ID: 35018405
For example:
MessageDlg(format('%g', [myinfo.totret]) , mtInformation, [mbOK], 0, mbOK);

Open in new window

0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

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

Objective: - This article will help user in how to convert their numeric value become words. How to use 1. You can copy this code in your Unit as function 2. than you can perform your function by type this code The Code   (CODE) The Im…
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…
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 …
Visualize your data even better in Access queries. Given a date and a value, this lesson shows how to compare that value with the previous value, calculate the difference, and display a circle if the value is the same, an up triangle if it increased…
Suggested Courses
Course of the Month13 days, 11 hours left to enroll

800 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