帮忙解释一下下面两个inputQuery函数,最好举个例子.
function InputQuery(const ACaption, APrompt: WideString; var Value: Double, Min: Double = Low(Integer); Max: Double = High(Integer); Decimals: Integer = 1): Boolean; overload;function InputQuery(const ACaption, APrompt: WideString; var Value: Integer, Min: Integer = Low(Integer); Max: Integer = High(Integer); Increment: Integer = 1): Boolean; overload
;
function InputQuery(const ACaption, APrompt: WideString; var Value: Double, Min: Double = Low(Integer); Max: Double = High(Integer); Decimals: Integer = 1): Boolean; overload;function InputQuery(const ACaption, APrompt: WideString; var Value: Integer, Min: Integer = Low(Integer); Max: Integer = High(Integer); Increment: Integer = 1): Boolean; overload
;
解决方案 »
- 想学习写一个TEDIT控件,使其输入时color为红色,exit时color为白色,不知如何写?
- 图像处理问题(BMP->JPG 为啥老是提示EoutofResources),各位大侠帮忙...着急啊..
- 数据插入解决断号问题
- 请教高手:怎么用POP3命令检测邮箱里面是否有新邮件?
- 有没有这样的软件??
- 请教大家一个转换为日期的问题
- 请问delphi中select语句的返回值怎么获得??
- 编写程序时,整体右移的快捷键是什么?我只记得左移用ctrl+shift+U键
- 有没有人用过这样的程序?~~~~~~~~
- 怎样用MASKEDIT控制小数?
- 关于调试组件的问题,在线等
- 为什么执行update语句后,数据库的数据没有马上更新?
Call InputQuery to bring up an input dialog box ready for the user to enter a string, double, or integer in its edit box.ACaption is the caption of the dialog box.APrompt is the text that prompts the user to enter input in the edit box.Value is the value that appears in the edit box when the dialog box first appears and which returns the value that the user enters.AMin is the minimum value the user can enter into the edit box.AMax is the maximum value the user can enter into the edit box.Decimals does nothing.Increment controls the amount by which the value in the spin control changes when the user clicks the up or down arrow. (It has no effect on values that the user types).InputQuery returns true if the user chooses OK, and false if the user chooses Cancel or presses the Esc key.If a default value should be used when the user cancels out of the dialog, use InputBox instead.
var
sAnswer: string;
begin
if InputQuery('提问', '1+1 = ?', sAnswer) then
ShowMessage('Answer is ' + sAnswer);
end;
uses
QDialogs;
{$R *.dfm}
procedure TForm1.Button1Click(Sender: TObject);
var
fAnswer: Double;
begin
if InputQuery('提问', '1+1 = ?', fAnswer) then
ShowMessage('Answer is ' + FloatToStr(fAnswer));
end;