How to draw directly on the Windows Desktop?
Answer Posted / srinivas
Through some API functions like
To draw a text
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;
| Is This Answer Correct ? | 2 Yes | 2 No |
Post New Answer View All Answers
How to Change the display mode settings in code?
What are the reasons involved in using the interface?
How to display an application associated icons?
How to retrieve an InterBase Blob in Delphi using SavetoFile?
How to Change the printer setup between pages?
What is the target load order?
How to Determine if a combobox is in dropped state?
How to Disable ALT-F4 to prevent form closing
'Memo too large' error with MSSQL . What does this error indicates?
How to Initialize an array or record to null?
what are the uses of Arrow and Function Keys ?
How do we get access to a database from Delphi?
How to Generate a Windows Console Application?
How does Delphi handle Windows callbacks?
How to place a bitmap in a Metafile?