How to draw directly on the Windows Desktop?



How to draw directly on the Windows Desktop?..

Answer / 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

More Delphi Interview Questions

How to Get the current line number of a TMemo?

0 Answers  


How to Write a raw string of data to the printer?

0 Answers  


I am trying to call from Delphi and it GPFs. Whats up?

0 Answers  


What versions of Delphi are there?

0 Answers  


How to Determine minor version number?

0 Answers   Infosys,






How to Determine if you have Delphi v3.02 installed?

0 Answers  


What is the tag property useful for?

0 Answers  


How much disk space, memory, etc, do I need to run Delphi?

0 Answers  


How to Stop TScrollbar button from blinking ?

0 Answers  


How to display seconds, minutes, tracks of an AVI ?

0 Answers  


How to Log in to the remote datamodule?

0 Answers  


How to Display a bitmap on the client area of an MDI parent form?

0 Answers  


Categories