How to draw directly on the Windows Desktop?
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 |
How to retrieve a list of assigned properties ?
How to Declare a SafeArray in the type library editor?
How to Place a grid in edit mode programatically?
How to Send a file via DCOM ?
How to set the default form font in Delphi?
How to Use Visual Basic arrays in Delphi ?
How to get serial number of my drive ?
How to Implement the VB TwipsPerPixel in Delphi ?
Explain the MasterSource/MasterFields behavior?
How to Change the default width/height of the editor?
How to create a console application in Kylix?
How to Change the display mode settings in code?