Mega Code Archive

 
Categories / Delphi / LAN Web TCP
 

How to determine if the current session is remotely controlled

Title: How to determine if the current session is remotely controlled 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;