Solved

Changing screen resolution

Posted on 1998-05-12
3
224 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
[X]
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
  • 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

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

In this tutorial I will show you how to use the Windows Speech API in Delphi. I will only cover basic functions such as text to speech and controlling the speed of the speech. SAPI Installation First you need to install the SAPI type library, th…
Have you ever had your Delphi form/application just hanging while waiting for data to load? This is the article to read if you want to learn some things about adding threads for data loading in the background. First, I'll setup a general applica…
In this video, viewers are given an introduction to using the Windows 10 Snipping Tool, how to quickly locate it when it's needed and also how make it always available with a single click of a mouse button, by pinning it to the Desktop Task Bar. Int…
In this video we outline the Physical Segments view of NetCrunch network monitor. By following this brief how-to video, you will be able to learn how NetCrunch visualizes your network, how granular is the information collected, as well as where to f…

724 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