- - * - WhiteUnicorn - * - -




* #WhiteUnicorn/ StartPage/ Documentation/DelphiFAQ >


Frequently Asked Questions

How can I draw directly on the Windows Desktop?

Question:

How can I draw directly on the Windows Desktop?

Answer:

The following example uses the dc returned from GetDc(0)

with the Windows API drawing functions to draw on the 

Windows Desktop.



Example:



procedure TForm1.Button1Click(Sender: TObject);

var

  dc : hdc;

begin

  dc := GetDc(0);

  MoveToEx(Dc, 0, 0, nil);

  LineTo(Dc, 300, 300);

  ReleaseDc(0, Dc);

end;



* #WhiteUnicorn/ StartPage/ Documentation/DelphiFAQ >



- - * - Anastasija aka WhiteUnicorn - * - - LJLiveJournal
PFPhotoFile