Delphi How can I check the cport status? -
how can check cport status using comled or label displaying enabled/disabled.
i've try if cport1.connected then
not satisfy me, status keeps on telling connected though not.
does here have better solution?
note: use timer check port status.
if understand question correctly,first should find ports connect device code :
procedure findports(s:tstrings); var r:tregistry; i:integer; begin r:=tregistry.create(key_read); r.rootkey:=hkey_local_machine; if r.openkey('hardware\devicemap\serialcomm',false) begin r.getvaluenames(s); i:=0 s.count-1 s[i]:=r.readstring(s[i]); end; r.closekey; end;
Comments
Post a Comment