怎样自定义一个函数单元包供所有其他单元调用?
解决方案 »
- 用CXGRID 自带的过滤时,有没有办法让他自动把条件后面的空格去掉
- 怎么隐藏按钮?
- 总觉得DateTimePicker输入日期并不方便,光标在 yyyy,MM,DD三个位置上不能自动移动,还要按方向键才行.
- 如何获得连接打印服务器的打印机的当前状态?????????????????????????????????
- 一个有关DBLookupComboBox的级联问题
- 新手上路:关于FastReport的主从报表问题请教,急急急,高分送!
- 怎样在字符串中取出数字?
- 已知图形中某封闭区域的一点,用什么算法,能查找出该封闭区域。
- 急问:如何在程序中检测表是否设置关键字和创建关键字?最高分127
- 请教如何实现在INET上的报时台?
- Is it delphi`s bug?????
- clientdataset1.ApplyUpdates(0);成功保存后如何返回成功保存的信息,即如何判断成功保存了
单元一
unit Unit1;interfaceuses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls;type
TForm1 = class(TForm)
Button1: TButton;
procedure Button1Click(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;var
Form1: TForm1;implementation
uses unit2;
{$R *.dfm}procedure TForm1.Button1Click(Sender: TObject);
var
sd: string;
begin
sd:=IntToStr(DoubleTheValue(123));
MessageDlg(sd,mtConfirmation, [mbYes, mbNo], 0);
if MessageDlg('Welcome to my Delphi application. Exit now?',
mtConfirmation, [mbYes, mbNo], 0) = mrYes then
begin
MessageDlg('Exiting the Delphi application.', mtInformation,
[mbOk], 0);
Close;
end;
end;end.单元二
unit Unit2;interfaceimplementation
function DoubleTheValue (ss: Integer): Integer;
begin
ss := ss * 2; // compiler error
Result := ss;
end;
end.但是不行?????