size of window decorations

Claus Dreischer claus at dreischer.de
Sun Jan 9 03:15:16 EST 2011


... and this stack script is what i came up with
(i only needed a windows XP solution)
(beware of email line breaks):


      -- shrink to min
      revChangeWindowSize the minWidth of me, the minHeight of
me,"slide",,500
      revUpdateGeometry

      -- get dimensions from screen and stack
      set the itemDelimiter to comma
      put item 3 of the working screenRect into screen_x
      put the width of this stack into stack_x
      put the height of this stack into stack_y

      -- get dimension from window caption
      get queryRegistry("HKEY_CURRENT_USER\Control
Panel\desktop\WindowMetrics\CaptionHeight")
      if (it is not a number) or ( it = 0) then put 18 into stack_caption
      else
         put round(it / -15) into stack_caption  -- strange dimension
      end if

      -- move window in upper right corner
      move this stack to screen_x - round(stack_x/2) - 4,
round(stack_y/2) + stack_caption + 4 in 1 sec




More information about the use-livecode mailing list