Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people, just like you, are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
Solved

Changing screen resolution

Posted on 1998-05-12
3
222 Views
Last Modified: 2010-04-06
How do I change the screen resolution when running a Delphi program without the change being permanent? Most win95 games with some advaned graphics (such as Red Alert, Outlaws etc.) do this when they run, and then restores the resolution when they terminate without messing up the desktop icons.
0
Comment
Question by:red_2
  • 2
3 Comments
 
LVL 4

Accepted Solution

by:
BoRiS earned 50 total points
ID: 1345040
red_2

on your onformcreate procedure pass the API ChangeDisplaySettings

The ChangeDisplaySettings function changes the display settings to the specified graphics mode.

this API will allow you to set the pixels width and height etc.

then on the onformclose procedure do the same setting it back to what it was...

also checkout the delphi gaming components I forget the URL just search for them
they set the displaysettings and then set them back...

Later
BoRiS
0
 

Author Comment

by:red_2
ID: 1345041
I have tried to use the ChangeDisplaySettings, but I'm not sure how to use the parameters. If I try to declare a variable of type DEVMODE or LPDEVMODE I get an error message.
0
 
LVL 4

Expert Comment

by:BoRiS
ID: 1345042
red_2

Have you passed them as TDEVMODE, etc

Later
BoRiS
0

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Delphi XE10, DigitalPersona Fingerprint reader and MySQL 6 325
Multiple image collision 13 80
Create a path if not exists 7 89
FMX and jaudiotracker playing memory stream 29 85
The uses clause is one of those things that just tends to grow and grow. Most of the time this is in the main form, as it's from this form that all others are called. If you have a big application (including many forms), the uses clause in the in…
Hello everybody This Article will show you how to validate number with TEdit control, What's the TEdit control? TEdit is a standard Windows edit control on a form, it allows to user to write, read and copy/paste single line of text. Usua…
This video shows how to use Hyena, from SystemTools Software, to bulk import 100 user accounts from an external text file. View in 1080p for best video quality.
I've attached the XLSM Excel spreadsheet I used in the video and also text files containing the macros used below. https://filedb.experts-exchange.com/incoming/2017/03_w12/1151775/Permutations.txt https://filedb.experts-exchange.com/incoming/201…

839 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question