News:

MASM32 SDK Description, downloads and other helpful links
MASM32.com New Forum Link
masmforum WebSite

Changing Video Resolution Quickly

Started by Bill Cravener, February 18, 2009, 05:13:46 PM

Previous topic - Next topic

NightWare

#15
until i find a way to filter thoses display, i must search if there is an already existing resolution... not numberous anyway... here the tray tool, work fine for me but must be tested (it's all in french, sorry but, if i translate it, it will takes me 2 weeks...  :()

EDIT :
changed the minimum processor required, thanks PBrennick.

EDIT 2 :
oops, correction, should work for all resolution now...

[attachment deleted by admin]

PBrennick

I get a minimum processor error which I do not think I should so there is something odd about the code. I think I will just write my own.

What did you need to use CPUID for??

Paul
The GeneSys Project is available from:
The Repository or My crappy website

NightWare

Quote from: PBrennick on February 20, 2009, 11:12:11 PM
What did you need to use CPUID for??
no need here, it's just included in my tray app skeleton...

Bill Cravener

Quote from: donkey on February 19, 2009, 03:11:53 AM
My display looks awful in anything but 1920x1200, well 1024x768 isn't bad but lacks real estate, way too busy of a desktop for that small a resolution. Nice utility for the toolbox though.

Hi Edgar,

1920x1200 just would not work for me :eek my eyesight isn't what it once was. I wear thick reading glasses and I blame over 25 years of staring at computer monitors for damaging my eye site. 1280x1024 is my limit if the monitor is at least a 19 incher. I work on numerous small notebooks with 8.5 inch screens and laptops with 15 inch screens at work running 1024x768. Staring at those little notebooks always strains my eyes but they are popular with those that travel or carry them back and forth everyday to home and work.
My MASM32 Examples.

"Prejudice does not arise from low intelligence it arises from conservative ideals to which people of low intelligence are drawn." ~ Isaidthat

Bill Cravener

Quote from: evlncrn8 on February 20, 2009, 08:59:31 PM
i think something similar was in win 9x.. maybe part of the plus pack...


Yes, I believe thats the one I'm thinking of. That was some time ago.
My MASM32 Examples.

"Prejudice does not arise from low intelligence it arises from conservative ideals to which people of low intelligence are drawn." ~ Isaidthat

PBrennick

#20
CycleSaddles,
Here is the same program with some modifications so thart it minimizes to the System Tray. When the dialog is showing thwe Radio Buttons and the Switch Button work as they did in the old program. The Close, Minimize and X buttons all cause the dialog to minimize to the System Tray.

Once the Program is running in the Tray, it has a Right-Click menu that has two instructions to duplicate what the Switch button does so you can do everything from the Tray. I added a couple of other menu items to give you some ideas of where you might go from here. There is an Exit manu item to close the program there. Tomorrow, when I will add an Exit Button to the Dialog. If you want the Close Button to perform the Exit, change the code in WM_CLOSE to:

        invoke  DestroyWindow, hWnd     ; End Program

That will also make the X button Exit the program, also.

As in the past change 60 and 85 hz values to suit.

2-22-2009:7:56 The attachment has been moved to the next post down.

Paul
The GeneSys Project is available from:
The Repository or My crappy website

PBrennick

New upload. I have added Separators into the menu for appearance sake. The Exit button is now on board and the Close button has changed into a Minimize Button. The X button does the same as the Exit button. So, now, everything works as expected.

I do not know if I should add submenues or not. I added the separators so people can see how it is done with AppendMenu. If anyone has trouble with submenues, just ask. I have another version of this tray utility that uses a window instead of a dialog. I can post if it is needed. That is my main LINKS program. All the websites I visit are in there for easy access. (Just to say what can be done to continue to make this small thing more and more useful).

Paul

[attachment deleted by admin]
The GeneSys Project is available from:
The Repository or My crappy website

FORTRANS

Hi Paul,

   Just tried it with some weird results.  The resolustion
changed from 1024 to 1280, but my background picture
and start bar did not adjust.  Trying to return to 1024 did
not work.  Matrox G400 video card with Windows 2000.

Regards,

Steve N.

PBrennick

As I said, those values need to be changed to suit your display adapter. Please do not run this program without knowing what the settings should be and changing them accordingly.

1. Right click the Desktop and choose Properties.
2. Click the Settings Tab.
3. Click the Advanced button.
4. Click Adapter.
5. Clcik the List All Modes Button.
6. Scroll down to 1024x768 (True Color (32 bit).
7. Change the program to use the exact same Hertz setting.
8. Repeat 6 & 7 for 1280X1024 (etc.) and make the same adjustment in the source.
9. Rebuild the program.
10. Now, it will run correctly.

QuoteAs in the past change 60 and 85 hz values to suit.

That is there in the above post for a reason, my friend.
Paul
The GeneSys Project is available from:
The Repository or My crappy website

Bill Cravener

Paul, you are on the right track placing it in the system tray. When I set the appropriate settings to fit my video system it works perfect.

This has gotten me more interested and since I have had nothing to do today I played around with the EnumDisplayDevices and EnumDisplaySettings API's and put together the attached simple example. It has been fun playing with considering the awful winter weather outdoors. Anyways, my old NVIDIA card appears to handle over 150 different modes. Why so many I don't know but that is what is returned by my little test app. I have only run this on my Vista machine and would be curious how many graphic modes other systems return (requires a lot of mouse clicking though).  :bg






[attachment deleted by admin]
My MASM32 Examples.

"Prejudice does not arise from low intelligence it arises from conservative ideals to which people of low intelligence are drawn." ~ Isaidthat

PBrennick

Cycle Saddles,

INTEL 82845G/GL/GE/PE/GV Graphics Controller

My result was 232 which is a lot more than is shown in the Settings Dialog. I think a lot of the really odd ones that Windows wont like are not shown and that may be why.

For example: 320x200 (looks like my display adapter works on handhelds, also).

Paul
The GeneSys Project is available from:
The Repository or My crappy website

Bill Cravener

#26
My NVIDIA reports 320x200 as the lowest graphics mode also.

Interesting, when I run enumdisplay.exe in Windows 2000 or XP - Virtual PC it states that the video card is a S3 Trio32/64 supporting 29 modes not the NVIDIA card actually installed in my Vista system which reports 156 modes. It is odd that it returns a frequency of 1 in the 4 bit color modes?? Wow, that refresh would be tuff on the old eyes.



EDIT: On further examination when you call the EnumDisplaySettings function the dmDisplayFrequency member may return with the value 0 or 1. This value represents the display hardware's default refresh rate whatever that happens to be.


My MASM32 Examples.

"Prejudice does not arise from low intelligence it arises from conservative ideals to which people of low intelligence are drawn." ~ Isaidthat

PBrennick

Exactly, about the '1' I mean. That means that the refresh rate for that setting can be the default which also means that more than one refresh rate will work for that setting. 800x600 used to have flicker problems and you could successfuklly bump up the refresh rate from the chip default.

About the S3 Trio thing, it is probably because that is a 'nearest match' used by Virtual PC. It does not have a large driver set and you are stuck with what you get, I guess.

Do you need to know how to do submenues with AppendMenu or are you all set?

Paul
The GeneSys Project is available from:
The Repository or My crappy website

GregL

No matter what the actual graphics card, Virtual PC always uses the 'S3 Trio32/64' as the virtual graphics card.

PBrennick

Thanks, Greg,

I new it was not a wide selection. Guess it is no selection at all!

Paul
The GeneSys Project is available from:
The Repository or My crappy website