1怎么修改 button的颜色?(字体及背景)
修改button.font.color怎么没有用?2
function 不用定义吗?发现直接写到implementation就可以了3
begin
Application.Initialize;
Application.CreateForm(TForm1, Form1);
Application.CreateForm(TForm2, Form2);
Application.Run;
end.
为什么看不到form24
unit1.pas:
implementationfunction WF: Integer;
begin
ShowMessage('Hello World');
Result := 1;
end;
//-------------------------------------------------------------
unit2.pas:
uses Unit1;
procedure TForm2.Button1Click(Sender: TObject);
var
vvv: Integer ;
begin
vvv:= Unit1.WF;//为什么不通过?
end;
修改button.font.color怎么没有用?2
function 不用定义吗?发现直接写到implementation就可以了3
begin
Application.Initialize;
Application.CreateForm(TForm1, Form1);
Application.CreateForm(TForm2, Form2);
Application.Run;
end.
为什么看不到form24
unit1.pas:
implementationfunction WF: Integer;
begin
ShowMessage('Hello World');
Result := 1;
end;
//-------------------------------------------------------------
unit2.pas:
uses Unit1;
procedure TForm2.Button1Click(Sender: TObject);
var
vvv: Integer ;
begin
vvv:= Unit1.WF;//为什么不通过?
end;
如果想在其他单元用,必须在public声明
3、这时候form1是主窗体
unit1.pas:
function WF: Integer; ///////////////////
implementationfunction WF: Integer;
begin
ShowMessage('Hello World');
Result := 1;
end;
//-------------------------------------------------------------
unit2.pas:
uses Unit1;
procedure TForm2.Button1Click(Sender: TObject);
var
vvv: Integer ;
begin
vvv:= Unit1.WF;//ok 了
end;
begin
Application.Initialize;
Application.CreateForm(TForm1, Form1);
Application.CreateForm(TForm2, Form2);
form2.show;///////////////////////
Application.Run;
end.
3。form1是主窗体,当前只显示主窗体。
4。WF只能在form1中使用
2、var
DmMain: TDmMain;
function IsDl(Icount:integer):boolean;//判断用户权限
function xTOd(i:Real):string;//人民币大写转换
implementation//我是这样的
3、form2不是主窗口,要显示的话按楼上的说
unit1.pas:
public
function WF: Integer;[Error] Unit1.pas(32): Unsatisfied forward or external declaration: 'TForm1.WF'This error message appears when you have a forward or external declaration of a procedure or function, or a declaration of a method in a class or object type, and you don't define the procedure, function or method anywhere.csdn真慢,时好时坏//the 6th time to reply
2、var
DmMain: TDmMain;
function IsDl(Icount:integer):boolean;//判断用户权限
function xTOd(i:Real):string;//人民币大写转换
implementation//我是这样的
3、form2不是主窗口,要显示的话按楼上的说
那么button.font.color有什么作用呢//你们的网速慢吗
over
如果想在其他单元用,必须在public声明