detecting sreen resolution

detecting sreen resolution

Post by Michael Vilhelmse » Tue, 24 Jun 2003 17:50:54



Hi

I don't know if this is the right place to ask, but anyway,....

I would like to detect the screen resolution from within Delphi 5.
How do I do that ?

Michael

 
 
 

detecting sreen resolution

Post by Ananth B » Tue, 24 Jun 2003 18:07:58


Hi Michael,
  Screen.Width and Screen.Height (Screen is a global object instantiated
along with Application) give you the width and height of the screen in
pixels. The Windows API GetSystemMetrics (with params SM_CXSCREEN and
SM_CYSCREEN) also does the same thing.

Regards,
Ananth B.


Quote:> Hi

> I don't know if this is the right place to ask, but [snip]


 
 
 

detecting sreen resolution

Post by Alexey Barkovo » Tue, 24 Jun 2003 18:15:53


Try Forms.Screen.Width & Forms.Screen.Height. Not sure is Screen global
variable available in Delphi5.


Quote:> Hi

> I don't know if this is the right place to ask, but anyway,....

> I would like to detect the screen resolution from within Delphi 5.
> How do I do that ?

> Michael

 
 
 

detecting sreen resolution

Post by Michael Vilhelmse » Tue, 24 Jun 2003 18:22:01


So obvious.

Thank you both

Michael



Quote:> Hi

> I don't know if this is the right place to ask, but anyway,....

> I would like to detect the screen resolution from within Delphi 5.
> How do I do that ?

> Michael

 
 
 

detecting sreen resolution

Post by Ananth B » Tue, 24 Jun 2003 19:43:43


Hi Alex,
  From the Delphi (5) help files
"There is a global variable, Screen, of type TScreen, which is already
instantiated for use by Delphi applications. Use Screen to obtain
information about the current state of the screen in an application."

Regards,
Ananth B.


Quote:> Try Forms.Screen.Width & Forms.Screen.Height. Not sure is Screen [snip]

 
 
 

detecting sreen resolution

Post by Jens Grusche » Tue, 24 Jun 2003 23:36:19


Quote:> So obvious.

By the way... if you need to be notified whenever the screen mode changes,
WM_DISPLAYCHANGE might help you (override WndProc of your form). I'm not
sure whether or not Screen.Width and Height are updated whenever this
happens.

Jens

 
 
 

1. Detecting change of screen resolution

I am writing this program that attaches it's self to the edges of the
screen, and it works fine, but when I change my screen resolution, I want it
to reattach to the new size.  I know it has to do with capturing windows
messages, but I can't figure it out.  Any help would be greatly appreciated.

Thanks
Bill~~!

2. PSP6 evaluation

3. How do detect a change of resolution ?

4. Character Studio - Making great animation

5. How to detect resolution of the image?

6. Dynamic texture mapping eats all memory

7. Detecting dynamic resolution changes?

8. ANNOUNCE: POVRay Liquid Spray Include File

9. Sreen Capture to .AVI.

10. Sreen door shadowing

11. 3D sreen savers won't display

12. Size of TForm with multiples sreen size

13. Screen size - form using max of sreen.