[an error occurred while processing this directive] [an error occurred while processing this directive]
Ответ: TComPort for Delphi
(«Телесистемы»: Конференция «Микроконтроллеры и их применение»)
[an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive]

Отправлено AK 21 ноября 2001 г. 05:36
В ответ на: Ответ: пытаюсь решить похожую задачу... отправлено Михаил Евстафьев 20 ноября 2001 г. 20:23

Answer to Q.1: Enumerating ports

procedure EnumComPorts(Ports: TStrings);
Enumerates serial ports on local computer.
Call EnumComPorts to fill Ports paramater with installed com ports on local computer. Ports parameter is a TString descendant created and maintained by the application. Application can assign Ports member to PortNum property to set port number.

//---------------------------------

Before setting serial port number, it is useful to call EnumComPorts procedure to enumerate serial ports on local machine. Application can then assign a member of TStrings result to PortNum property.

Example

begin
EnumComPorts(ComboBox1.Items);
// do some stuff
ComPort1.PortNum := ComboBox1.Items[ComboBox1.ItemIndex];
end;

Составить ответ  |||  Конференция  |||  Архив

Ответы



Перейти к списку ответов  |||  Конференция  |||  Архив  |||  Главная страница  |||  Содержание  |||  Без кадра

E-mail: info@telesys.ru