Can I load a memo or rich edit from a text file on server?

后端 未结 3 372
一生所求
一生所求 2021-01-15 05:36

I designed a website and its uploaded to server and is working fine. in one of these pages i get some info from users like their addresses and ... and save them to a text fi

3条回答
  •  情歌与酒
    2021-01-15 05:59

    Drop a TMemo or TRichedit on the form of your application. Then drop a TidHTTP component from the Indy components.

    add a onclick button event event and do the following:

    procedure TForm1.Button1Click(Sender: TObject);
    begin
    memo1.lines.Text:= idHttp1.Get('http://www.delphiprojectcode.com/test.txt');
    end;

    OR

    procedure TForm1.Button1Click(Sender: TObject);
    begin
    richedit1.Text:= idHttp1.Get('http://www.delphiprojectcode.com/test.txt');
    end;

提交回复
热议问题