{
Call GetSystemMetrics() with the Flag SM_REMOTECONTROL to determine
if the current session is remotely controlled.
Its value is TRUE if the current session is remotely controlled;
FALSE otherwise.
}
function IsRemotelyControlled: Boolean; const SM_REMOTECONTROL = $2001; // from WinUser.h begin Result := Boolean(GetSystemMetrics(SM_REMOTECONTROL)); end;
procedure TForm1.Button1Click(Sender: TObject); begin
if IsRemotelyControlled then ShowMessage('Remotely controlled.') else ShowMessage('Not Remotely controlled.') end;