Solved

Changing screen resolution

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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
code issue 8 100
Tviruailstringtree sort multi columns on header click 1 54
JAudiorecorder record freezing the app 29 60
How to load 2 images in same column in Delphi 2 34
Creating an auto free TStringList The TStringList is a basic and frequently used object in Delphi. On many occasions, you may want to create a temporary list, process some items in the list and be done with the list. In such cases, you have to…
Introduction Raise your hands if you were as upset with FireMonkey as I was when I discovered that there was no TListview.  I use TListView in almost all of my applications I've written, and I was not going to compromise by resorting to TStringGrid…
Along with being a a promotional video for my three-day Annielytics Dashboard Seminor, this Micro Tutorial is an intro to Google Analytics API data.
As a trusted technology advisor to your customers you are likely getting the daily question of, ‘should I put this in the cloud?’ As customer demands for cloud services increases, companies will see a shift from traditional buying patterns to new…

895 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

Need Help in Real-Time?

Connect with top rated Experts

17 Experts available now in Live!

Get 1:1 Help Now