Thursday, January 27, 2011

form position at bottom of the screen

uses ....,shellapi;

VAR
  appbardata    : TAppBarData;
  Rect          : TRect;
  taskBarHeight : Integer;
begin
  // Get The Taskbar Height
  FillChar ( AppBarData,SizeOf(AppBarData),0);
  SHAppBarMessage(ABM_GETTASKBARPOS, appbardata);
  Rect := appbardata.rc;
  taskBarHeight := Rect.Bottom - Rect.Top;

  Left := ( Screen.Width - Width ) DIV 2;
  Top  := Screen.Height - Height - Taskbarheight +2;
end;

0 comments:

Post a Comment

Twitter Delicious Facebook Digg Stumbleupon Favorites More

 
Design by Kang Iwan K-sev | Thank's for your visit To My Site - Ridwan Mulyana | Cibeureum