I.T. Discussion Community!
-Collapse +Expand
Delphi
Search Delphi Group:

Advanced
-Collapse +Expand Delphi To/From
To/FromCODEGuides
-Collapse +Expand Delphi Store
PRESTWOODSTORE

Prestwood eMagazine

April Edition
Subscribe now! It's Free!
Enter your email:

   ► MB LobbyPascal and Delphi Coding BoardDelphi Object PASCAL Topic   Print This     

How to check screen resolution?

How to check screen resolution? in Delphi Object PASCAL topic (part of our Pascal and Delphi Coding group).

Quick Search: resolution   How check   How check screen  
Badzooka
Citrus Heights, CA 95610
Filling in for user "Me", who didn't want to start another topic...



ok this is not about ini-files, but I don't want to start any more topics...

How to check screen resolution?

 Posted 19 years ago (Thread Starter)
Comment Quote
About Badzooka -Collapse +Expand
Visit Profile
Approved member.
Member subscribes to this thread with a verified email.

Post ID #7188, 3 replies
Thread Started 8/2/2002 4:09:00 PM
View Counter=2310
Last Reply Posted 8/3/2002 10:52:00 AM)
Location=Citrus Heights, CA 95610  
Joined=21 years ago   MB Posts=28  
Moderator
Mike Prestwood
Prestwood IT
Prestwood IT office in Citrus Heights, CA
Use the Screen variable which is a TScreen. The Screen variable is a TScreen component that represents the screen of the system on which the application runs. By default, applications create a screen component based on information from Windows about the current screen device and assign it to Screen.

For example, put the following code in a button click:
MessageDlg(
'screen width = ' + IntToStr( Screen.Width ) +
', screen height = ' + IntToStr( Screen.Height ),
mtInformation, [mbOk], 0 );

--
Mike Prestwood
Prestwood IT Solutions

 Posted 19 years ago
Comment Quote
About Mike Prestwood -Collapse +Expand
Visit Profile
Approved member.
Member subscribes to this thread with a verified email.
About Mike Prestwood

Mike Prestwood is a drummer, an author, and creator of the PrestwoodBoards online community. He is the President & CEO of Prestwood IT Solutions. Prestwood IT provides Coding, Website, and Computer Tech services. Mike has authored 6 computer books and over 1,200 articles. As a drummer, he maintains play-drums.com and has authored 3 drum books. If you have a project you wish to discuss with Mike, you can send him a private message through his PrestwoodBoards home page or call him 9AM to 4PM PST at 916-726-5675 x205.

Web Presence
Facebook, Prestwood IT Facebook page -- fan page. (Visit Me)
Twitter, Follow Prestwood IT on Twitter. (Visit Me)
LinkedIn, Prestwood IT company page on LinkedIn. (Visit Me)
YouTube, Prestwood IT YouTube Channel (Visit My Channel)
Website, My drum website where I sell my drum books. (http://www.play-drums.com)

Post ID #7190 (Level 1.1)  Reply to 7188
Thread Started 8/2/2002 4:45:00 PM
View Counter=2
Location=Prestwood IT office in Citrus Heights, CA 
Joined=21 years ago   MB Posts=1410   KB Posts=1805   KB Comments=68   BLOG, Topics=4  
Most Recent Post
Me
-- USA
Thanks
 Posted 19 years ago
Comment Quote
About Me -Collapse +Expand
Visit Profile
Membership pending.
Member subscribes to this thread but email is NOT VERIFIED.
Email Not Verified!
Once email is verified, we will review and approve the account.
Web Presence Hidden.
Once above is taken care of, full Profile content will display including back links, about me, my message, custom Profile html, social networking links, message board signature, company profile, etc.

Post ID #7192 (Level 1.2)  Reply to 7188
Reply Posted 8/3/2002 10:52:00 AM
Location=-- USA 
Joined=19 years ago   MB Posts=25  
Scott Wehrly
Prestwood IT
 (Inactive)
Las Vegas, NV USA
Okay, I've been trying to find the answer to this one myself. I haven't found any Win32 calls that will give me that information.



However, I have found this in the Registry...

(key path)
HKEY_LOCAL_MACHINE
System
CurrentControlSet
Hardware Profiles
Current
System
CurrentControlSet
Services
nv3 (corresponds to the name of the driver)
Device0

(keys)
DefaultSettings.XResolution
DefaultSettings.YResolution



These settings change each time the screen resolution changes. The key path is based on the driver, so I don't expect the path to be identical on every machine.



Also, I have found the key path to be slightly different on Windows 98 machines, so no guarantees that this is the right way to fetch these settings. I'm on an NT 4.0 machine, so I expect that Win2K treats these settings differently.
 Posted 19 years ago
Comment Quote
About Scott Wehrly -Collapse +Expand
Visit Profile
Inactive member.
Member does not subscribe to this thread.
Old Account!
If this is your account, sign in to activate web presence data (sign in quarterly to keep active). Alternatively, you can subscribe to our monthly eMag with a valid email address.
Web Presence Hidden.
Once above is taken care of, full Profile content will display including back links, about me, my message, custom Profile html, social networking links, message board signature, company profile, etc.

Post ID #7189 (Level 1.3)  Reply to 7188
Reply Posted 8/2/2002 4:19:00 PM
Location=Las Vegas, NV USA 
Joined=19 years ago   MB Posts=442   KB Posts=19  

Revive Thread!

Add a comment to revive this old thread and make this archived thread more useful.

Write a Comment...
Full Editor
...
Sign in...

If you are a member, Sign In. Or, you can Create a Free account now.


Anonymous Post (text-only, no HTML):

Enter your name and security key.

Your Name:
Security key = P1111A1
Enter key:
Icon: A Post    Thread    Idea    Important!    Cool    Sad    No    Yes    Includes a Link...   
Thread #7188 Counter
2310
Since 4/2/2008

Follow PrestwoodBoards on: 


©1995-2021 PrestwoodBoards  [Security & Privacy]
Professional IT Services: Coding | Websites | Computer Tech