Board index » delphi » Delphi 4 : Screen Resolution

Delphi 4 : Screen Resolution

Hello,

How can I know what is the current resolution on my screen
(800x600,1024x768, etc ...) ?

TIA.

 

Re:Delphi 4 : Screen Resolution


On Wed, 21 Oct 1998 14:58:30 +0200, "Michel Peyron"

Quote
<mpey...@rockefeller.univ-lyon1.fr> wrote:
>Hello,

>How can I know what is the current resolution on my screen
>(800x600,1024x768, etc ...) ?

>TIA.

Unless it's changed from D2, try Screen.Width and Screen.Height.
Cheers, J

Re:Delphi 4 : Screen Resolution


Michel Peyron wrote ...
Quote
> How can I know what is the current resolution on my screen
> (800x600,1024x768, etc ...) ?

I've just learned it on fr.comp.lang.pascal : screen.width and screen.height

Re:Delphi 4 : Screen Resolution


Screen.Height, Screen.Width

if (Screen.Width = 640) then
  ShowMessage('My Screen is 640 pixels wide');

Quote
Michel Peyron wrote in message <70klk6$r9...@platane.wanadoo.fr>...
>Hello,

>How can I know what is the current resolution on my screen
>(800x600,1024x768, etc ...) ?

>TIA.

Re:Delphi 4 : Screen Resolution


Universal way:

ScrW := GetSytemMetrics(SM_CXSCREEN);
ScrH := GetSytemMetrics(SM_CYSCREEN);

Michel Peyron D??? ???Y?? <70klk6$r9...@platane.wanadoo.fr> ...

Quote
>Hello,

>How can I know what is the current resolution on my screen
>(800x600,1024x768, etc ...) ?

>TIA.

Other Threads