procedure DrawTextOnDesktop(TextToDraw: string) ;
var
Handle: HWND;
Dc: HDC;
ACanvas: TCanvas;
begin
Handle := GetDesktopWindow;
Dc := GetWindowDC(Handle) ;
ACanvas := TCanvas.Create;
try
ACanvas.Handle := DC;
BeginPath(ACanvas.Handle) ;
ACanvas.Font.Color := clRed;
ACanvas.Font.Name := 'Tahoma';
ACanvas.Font.Size := 30;
SetBkMode(ACanvas.Handle, TRANSPARENT) ;
EndPath(ACanvas.Handle) ;
ACanvas.TextOut(0, 0, TextToDraw) ;
finally
ReleaseDC(Handle, ACanvas.Handle) ;
ACanvas.Free;
end;
end;
procedure TForm1.Button1Click(Sender: TObject);
begin
DrawTextOnDesktop('deneme');
end;