function GetInetFile:Boolean;
var
App: TIniFile;
sUpd:TMemoryStream;
begin
App := TIniFile.Create(ExtractFilePath (Application.ExeName)+'Update.ini');
Ver:=App.ReadString('MyFileVer','Version','1');
App.Free;
sUpd:=TMemoryStream.Create;
Application.ProcessMessages();
//下面运行出错
IDHttp.Get (XXXXX);
end;
自己定义的过程为什么不能带VCL,怎么办,急啊。
555555555如果有别的方法请赐教.

解决方案 »

  1.   

    不是不能带VCL,而是你访问的是别的类的成员.
    IDHttp.Get (XXXXX);中的IDHttp是不是放在Form上的?
    如果是的话,比如form名称为form1你的函数应该定义为
    function Tform1.GetInetFile:Boolean;
    或者那一句写成form1.IDHttp.Get...
    例程:unit Unit1;interfaceuses
      Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
      Dialogs, StdCtrls, Buttons;type
      TForm1 = class(TForm)
        Button1: TButton;
        procedure Button1Click(Sender: TObject);
      private
        { Private declarations }
      public
        { Public declarations }
      end;var
      Form1: TForm1;implementation{$R *.dfm}
    procedure showcap;
    begin
      showmessage(form1.Button1.Caption);
    end;
    procedure TForm1.Button1Click(Sender: TObject);
    begin
       showcap;
    end;end.
      

  2.   

    IDHttp.Get (XXXXX);
    是什么东东,哪里出错,说清楚点