delphi
编程技巧
源代码在线查看: 获得ip的简单方法 (2001年2月11日).txt
获得IP的简单方法 (2001年2月11日)
网友更新 分类:系统 作者:闫 磊 推荐:闫 磊 阅读次数:828
(http://www.codesky.net)
--------------------------------------------------------------------------------
放一控件TNMDayTime(delphi自带的)在form1上
unit Unit1;
interface
uses
Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
StdCtrls, Psock, NMDayTim;
type
TForm1 = class(TForm)
NMDayTime1: TNMDayTime;
Button1: TButton;
procedure Button1Click(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
Form1: TForm1;
implementation
{$R *.DFM}
procedure TForm1.Button1Click(Sender: TObject);
begin
showmessage(NMDayTime1.LocalIP);
end;