dOPC Client Toolkit Help file
TdOPCServerBrowser.FindServer Method
C++
public: __fastcall int FindServer(
    AnsiString ServerName
);
C#
public int FindServer(
    String ServerName
);
Visual Basic
Public Function FindServer(
    ServerName As String
) As Integer

FindServer searches the passed ServerName in the Items collection. Returns the index if a match is found, otherwise 0.

procedure TForm1.Button1Click(Sender: TObject);
var
  Index : integer;
begin
  Index := dOPCServerBrowser1.FindServer('FactorySoft.Example.Alarm.1');
  if Index >= 0 then //if exists
  begin
    ShowMessage(dOPCServerBrowser1.Items[index].ServerCaption);
  end
  else
    ShowMessage('not found');
end;
What do you think about this topic? Send feedback!
Copyright © 2001-2014 Kassl GmbH (http://www.kassl.de). All rights reserved.