sorry,从未试过这个控件,看了一下代码,
不过就是用TIMER来读注册表,却搞得那么复杂。:-(
别用它了,下面的代码我已实验成功。
procedure TForm1.Timer1Timer(Sender: TObject);
var b: array[0..4] of Byte;
begin
with TRegistry.Create do
try
RootKey := HKEY_LOCAL_MACHINE;
OpenKey('System/CurrentControlSet/Services/RemoteAccess',False);
ReadBinaryData('Remote Connection',b,4);
finally
Free;
end;
if b[0]=1 then Caption:='OnLine' else Caption:='OffLine';
end;