定义前一个过程,是行的。第二个它却说
[error] unsatisfied forward or externaldeclaration :"tform1.openini1'部分代码如下:
 private
    { Private declarations }
       procedure ChangeSize(st:TstaticText);
    procedure OpenIni1(str1:string);
implementation{$R *.dfm}
 procedure TForm1.ChangeSize(st:TstaticText);
begin
if (st.Font.Color=clRed) then
 st.font.Color:=clWindowText
 else
  st.Font.Color:=clRed;
 end;
procedure OpenIni1(str1:String);
begin
application.Terminate;//为方便胡乱加一语句
 end;
end.ChangeSize是可以正确执行的。

解决方案 »

  1.   

    procedure TForm1.ChangeSize(st:TstaticText);
    begin
    if (st.Font.Color=clRed) then
     st.font.Color:=clWindowText
     else
      st.Font.Color:=clRed;
     end;
    procedure TForm1.OpenIni1(str1:String);//加上TForm1.
    begin
    application.Terminate; end;
    end.
      

  2.   

    procedure TForm1.OpenIni1(str1:String);修改成:
    procedure OpenIni1(str1:String);
      

  3.   

    在private或者public里面声明了函数或者过程之后,按Ctrl + Shift + C看看会有什么事情发生,呵呵
      

  4.   

    procedure TForm1.OpenIni1(str1:String);//TForm1不能少呀
    begin
     application.Terminate;//为方便胡乱加一语句
    end;private
        { Private declarations }
           procedure ChangeSize(st:TstaticText);
        procedure OpenIni1(str1:string);//可以在这里按Ctrl+Shift+C,Delphi自动生成过程
    implementation
      

  5.   

    谢谢各位热心人,小弟还有一贴,正郁闷ing.
    请高手们不吝指教。
    http://community.csdn.net/Expert/topic/3154/3154051.xml?temp=.7963526