📄 unit1.h
字号:
//---------------------------------------------------------------------------
#ifndef Unit1H
#define Unit1H
//---------------------------------------------------------------------------
#include <Classes.hpp>
#include <Controls.hpp>
#include <StdCtrls.hpp>
#include <Forms.hpp>
#include <ExtCtrls.hpp>
#define WM_ABOUTME WM_USER+101
//---------------------------------------------------------------------------
class TIP : public TForm
{
__published: // IDE-managed Components
TGroupBox *HostInfo;
TGroupBox *AdInfo;
TPanel *Panel1;
TStaticText *StaticText1;
TStaticText *StaticText2;
TStaticText *StaticText3;
TStaticText *StaticText4;
TStaticText *StaticText5;
TStaticText *StaticText6;
TComboBox *AdapterList;
TStaticText *StaticText7;
TStaticText *StaticText8;
TStaticText *StaticText9;
TStaticText *StaticText10;
TStaticText *StaticText11;
TStaticText *StaticText12;
TStaticText *StaticText13;
TStaticText *StaticText14;
TButton *Button1;
TButton *Button2;
TButton *Button3;
TButton *Button4;
TButton *Button5;
TStaticText *MyHostName;
TComboBox *CurrentAdapterIPAddress;
TStaticText *CurrentAdapterMask;
TComboBox *CurrentAdapterGetway;
TComboBox *CurrentAdapterDHCP;
TStaticText *FirstWins;
TStaticText *SecondWins;
TComboBox *DNSList;
TStaticText *NodeType;
TStaticText *StaticText15;
TStaticText *MacAddress;
TStaticText *EnabledIpRoute;
TStaticText *NetBiosScope;
TStaticText *NetBiosDNS;
TStaticText *LeaseObtained;
TStaticText *LeaseExpires;
void __fastcall FormClose(TObject *Sender, TCloseAction &Action);
void __fastcall FormCreate(TObject *Sender);
void __fastcall AdapterListChange(TObject *Sender);
void __fastcall Button1Click(TObject *Sender);
void __fastcall CurrentAdapterIPAddressChange(TObject *Sender);
void __fastcall Button2Click(TObject *Sender);
void __fastcall Button3Click(TObject *Sender);
void __fastcall Button4Click(TObject *Sender);
void __fastcall Button5Click(TObject *Sender);
private: // User declarations
void GetComputerAdapterList(void);
void GetIpAddressWithIndex(int index);
void GetEveryIpInfo(AnsiString IP);
void ReleaseIpWithIndex(int index);
void ReNewIpWithIndex(int index);
AnsiString GetMacAdd(AnsiString strIP);
void GetDNS(void);
void MySySCommand(TMessage &Msg);
TStringList *AdapterListIndex;
BEGIN_MESSAGE_MAP
MESSAGE_HANDLER(WM_SYSCOMMAND,TMessage,MySySCommand)
END_MESSAGE_MAP(TForm)
public: // User declarations
__fastcall TIP(TComponent* Owner);
};
//---------------------------------------------------------------------------
extern PACKAGE TIP *IP;
//---------------------------------------------------------------------------
#endif
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -