Why use the Windows API when you can retrieve the current screen resolution using two simple variables?
Screen.Width
Screen.Height
Screen.Height
Listing #1 : Delphi code. Download scrsize (0.16 KB).
MessageDlg(
'screen width = ' + IntToStr( Screen.Width ) +
', screen height = ' + IntToStr( Screen.Height ),
mtInformation, [mbOk], 0 );
'screen width = ' + IntToStr( Screen.Width ) +
', screen height = ' + IntToStr( Screen.Height ),
mtInformation, [mbOk], 0 );
Listing #2 : Delphi code. Download sample (0.23 KB).
0 comments:
Post a Comment