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
Do I have to understand object-oriented programming to use Delphi?
what are Safe Mode and VGA mode?
Why can't we display data in descending order in Delphi?
How to close the CD Tray in code?
How can I manipulate data programatically?
How to assign the Delphi global printer object, to the Quick Reports global printer object?
How to Extract Icons ?
How to Keep an application in a minimized state?
Write a program to show the memory leak?
How to Change the display mode settings in code?
How to Make text background transparent?
How to Calculate an angle from two points?
How to detect if a given key was pressed during application during startup?
How to Use an animated cursor?
what are the Font problems on NT 4.0?