var
hdldtp:thandle;
hdcdtp:hdc;
begin
hdldtp:=GetDesktopWindow();
hdcdtp:=GetWindowDC(hdldtp);
TextOut(hdcdtp,500,300,'Welcome to delphi bbs!',22);
ReleaseDC(hdldtp,hdcdtp);
end;
var
Acanvas:TCanvas;
begin
Acanvas:=TCanvas.Create;
with acanvas do
begin
Handle:=getdc(0);
brush.style:=bsclear;
font.size:=14;
textout(10,10,'hello');
ReleaseDC(0,acanvas.handle);
free;
end;
end;