26 Mart 2016 Cumartesi

Get Local IP Addresses via Delphi Indy 10

Yeni bir VCL Delphi uygulaması oluşturun. Aşağıdaki gibi bileşenleri yerleştirin. Button, label ve combobox....

Buttonun click olayına aşağıdaki kodu yazın hayırlı olsun.





Kodlarımız:

uses IdStack;

procedure TForm1.Button1Click(Sender: TObject);
begin
  TIdStack.IncUsage;
  try
    ComboBox1.Items.Clear;
    GStack.AddLocalAddressesToList(ComboBox1.Items);
    ComboBox1.ItemIndex:= 0;
  finally
    TIdStack.DecUsage;
  end;
end;


Hiç yorum yok:

Yorum Gönder