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


Please Help Members By Posting Answers For Below Questions

How to Send a file via DCOM ?

1361


How to Map a DLL into another process ?

1180


How to Determine if Delphi Running?

1393


How to dial out through the modem under Win32?

1252


'General SQL Error : Connection does not exist' in threaded application . what does this indicates?

1585






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

1370


Does Kylix support ODBC?

1344


How to display an application associated icons?

1300


How to connect to an InterBase database using the BDE API?

1468


what are Hetergenious joins ?

1333


What is the procedure to connect delphi application to ms access database?

439


With what commands you can Delete a directory and all the directories with files?

1148


Where to get TUpdateSQLProvider component ?

1305


What are the different ways of defining array sizes?

444


How to Change the printer setup between pages?

1398