Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...


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 Use JPEGs from resource files ?

0 Answers  


How to Perform undo on an edit control?

0 Answers  


How to draw transparent text onto a TBitmap ?

0 Answers  


Are there any tools to help me migrate my applications to Delphi?

0 Answers  


what is Object Activation ?

0 Answers  


How does Delphi handle Windows callbacks?

0 Answers  


How to use a true DWORD value passed to Delphi application?

0 Answers  


What directory is the ActiveForm in ?

0 Answers  


How to Typecaste a PChar to a longint?

0 Answers  


How to have a TBitBtn component that has a word wrapped caption?

0 Answers  


What is the equivalent in BCB to a Pdox TCursor?

0 Answers  


Explain the methods findfirst, findnext and findclose?

0 Answers  


Categories