Solved

Changing screen resolution

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

Better Security Awareness With Threat Intelligence

See how one of the leading financial services organizations uses Recorded Future as part of a holistic threat intelligence program to promote security awareness and proactively and efficiently identify threats.

Join & Write a Comment

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…
Introduction I have seen many questions in this Delphi topic area where queries in threads are needed or suggested. I know bumped into a similar need. This article will address some of the concepts when dealing with a multithreaded delphi database…
Here's a very brief overview of the methods PRTG Network Monitor (https://www.paessler.com/prtg) offers for monitoring bandwidth, to help you decide which methods you´d like to investigate in more detail.  The methods are covered in more detail in o…
This video gives you a great overview about bandwidth monitoring with SNMP and WMI with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're looking for how to monitor bandwidth using netflow or packet s…

744 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

11 Experts available now in Live!

Get 1:1 Help Now