Solved

Changing screen resolution

Posted on 1998-05-12
3
221 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

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Newbie Thread Programming 1 151
Strange behavior when a form is closed 6 57
control image tags in a string ? 12 129
how can i search if string exist in array ? 3 55
This article explains how to create forms/units independent of other forms/units object names in a delphi project. Have you ever created a form for user input in a Delphi project and then had the need to have that same form in a other Delphi proj…
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…
This Micro Tutorial demonstrates using Microsoft Excel pivot tables, how to reverse engineer competitors' marketing strategies through backlinks.
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …

805 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