?? getinternetlocalip.pas
字號:
unit GetInternetLocalIP;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, HTTPGet;
type
TGetInternetLocalIPForm = class(TForm)
HTTPGet1: THTTPGet;
procedure FormCreate(Sender: TObject);
procedure HTTPGet1DoneString(Sender: TObject; Result: string);
procedure HTTPGet1Error(Sender: TObject);
private
{ Private declarations }
public
TheInternetLocalIP: string;
end;
var
GetInternetLocalIPForm: TGetInternetLocalIPForm;
implementation
{$R *.dfm}
procedure TGetInternetLocalIPForm.FormCreate(Sender: TObject);
begin
TheInternetLocalIP := 'E';
HTTPGet1.URL := 'http://www.minkia.com.cn/ip.php';// 'http://www.neworigin.com.cn/GetNetIP';
HTTPGet1.GetString;
end;
procedure TGetInternetLocalIPForm.HTTPGet1DoneString(Sender: TObject; Result: string);
begin
TheInternetLocalIP := Result;
end;
procedure TGetInternetLocalIPForm.HTTPGet1Error(Sender: TObject);
begin
TheInternetLocalIP := '';
end;
end.
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -