01
Sep 08

Delphi: Utils :: SpeedButtonScreenPos

:: articles :: by Gilberto Saraiva

Folks,

For everybody that needs the Speedbutton position:

 Delphi |  copy code |? 
1
type
2
  TSpeedButtonAccess = class(TSpeedButton);
3
 
4
function SpeedButtonScreenPos(ASpeedButton: TSpeedButton): TPoint;
5
begin
6
  GetDCOrgEx(TSpeedButtonAccess(ASpeedButton).Canvas.Handle, Result);
7
  Inc(Result.X, ASpeedButton.Left);
8
  Inc(Result.Y, ASpeedButton.Top);
9
end;

Hugs!

Tags: , , ,


Leave a comment