8 delphi 函数
unit Unit1; interface uses Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, Dialogs, StdCtrls, IdBaseComponent, IdComponent, IdTCPConnection, IdTCPClient, IdHTTP; type TForm1 = class(TForm) Button1: TButton; Memo1: TMemo; IdHTTP1: TIdHTTP; procedure Button1Click(Sender: TObject); private { Private declarations } public { Public declarations } end; var Form1: TForm1; implementation uses util_utf8; {$R *.dfm} procedure TForm1.Button1Click(Sender: TObject); var strm: TStringStream; begin strm := TStringStream.Create(‘‘); try IdHTTP1.Get(‘‘, strm); Memo1.Clear; Memo1.Lines.Add(UTF8ToAnsi(strm.DataString)); finally strm.Free; end; end; end.
,温馨提示: 本文由Jm博客推荐,转载请保留链接: https://www.jmwww.net/file/67702.html
- 上一篇:windows下 matlab快速启动【
- 下一篇:简单计算器 C# 学习