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 create a power function?
How to Hide the windows taskbar?
How to Print a WEB page with the HTML control?
How to Display the first frame of an AVI File ?
How to use sets in code, such as adding to TDBGrid.Options, at run time?
How to Use FindFirst to search for files?
'Trying to append data to a non-partial dataset' . what does this error indicates?
How do abstract classes differ from interfaces?
How to Run 16-bit Delphi on Windows NT4?
How to Change the display mode settings in code?
How to Resize StringGrid Columns ?
How to convert a color to a shade of gray?
How to Creat a flashing icon ?
How to Switch between different data sources?
How to Set Up a C++ Builder or Delphi Form to View InterBase Data?