Why use the Windows API when you can retrieve the current screen resolution using two simple variables?
Screen.Width
Screen.Height



Above variables will automatically get updated if the screen resolution were to change while the application is running.
MessageDlg(Advertisement

'screen width = ' + IntToStr( Screen.Width ) +
', screen height = ' + IntToStr( Screen.Height ),
mtInformation, [mbOk], 0 );