Delphi-PRAXiS
Seite 2 von 2     12   

Delphi-PRAXiS (https://www.delphipraxis.net/forum.php)
-   Win32/Win64 API (native code) (https://www.delphipraxis.net/17-win32-win64-api-native-code/)
-   -   Delphi Auflistung aller 'verfügbaren' Comports (https://www.delphipraxis.net/85992-auflistung-aller-verfuegbaren-comports.html)

Robert Marquardt 8. Feb 2007 14:14

Re: Auflistung aller 'verfügbaren' Comports
 
So ist besser:
Delphi-Quellcode:
var
  i:integer;
begin
  ComPort.Items.BeginUpdate;
  ComPort.Items.Clear; //combobox
  for I := 1 to 30 do
    begin
    iComNum := I;
    if OpenCom(False) then
    begin
      ComPort.Items.Add(Format('COM%d',[I]));
      CloseCom;
    end;
  end;   // for
  ComPort.Items.EndUpdate;
  ComPort.ItemIndex := ComPort.Items.Count-1;
end;


Alle Zeitangaben in WEZ +1. Es ist jetzt 08:11 Uhr.
Seite 2 von 2     12   

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024 by Thomas Breitkreuz