dOPC Client Toolkit

FindByServerName searches the passed ServerName in the Items collection.

function FindByServerName(ServerName: string): integer;
__fastcall int FindByServerName(AnsiString ServerName);

Returns the index if a match is found, otherwise 0.

procedure TForm1.Button1Click(Sender: TObject); var Index : integer; begin Index := dOPCServerBrowser1.FindByServerName('FactorySoft.Example.Alarm.1'); if Index >= 0 then //if exists begin ShowMessage(dOPCServerBrowser1.Items[index].ServerCaption); end else ShowMessage('not found'); end;
Kassl GmbH Copyright © 2023. All rights reserved.