Diese Seite mit anderen teilen ...

Informationen zum Thema:
Forum:
WinDev Forum
Beiträge im Thema:
2
Erster Beitrag:
vor 4 Jahren, 8 Monaten
Letzter Beitrag:
vor 4 Jahren, 8 Monaten
Beteiligte Autoren:
Al, Danny Lauwers

[WD18] Set screen resolution in XP

Startbeitrag von Danny Lauwers am 13.08.2013 10:32

Hi,

I created a routine that base on the wanted resolution, it searches for the best match in the list of possible resolutions and then switches to that resolution.

I use SysScreenResolution and SysChangeScreenResolution todo this.

It works on Windows 7 and Vista, but not on Windows XP ?? I also don't get an error ?
I can set the resolution manualy without a problem ! :confused:

Any body doing on the fly resolution switching in a WinDev program on Windows XP ?

What could be wrong ?

Thanks
Danny

Antworten:

Hello Danny

I still develop on an XP computer so I tried this out for you and it worked fine.
My normal resolution is 1920 x 1080.
I only tried it with hard code not using variables.

I ran this code in the first line of a project to find out the pixel bits and refresh rates that the card was running at
( NVIDIA Quadro FX 3400/4400)
ResString is string = SysScreenResolution()
Trace("Width Resolution = "+ ExtractString(ResString,1) + CR +...
"Width resolution = " + ExtractString(ResString,2) + CR + ...
"Nb bits per pixel = " + ExtractString(ResString,3) + CR + ...
"Refresh rate = " + ExtractString(ResString,4))

SysChangeScreenResolution(1024,768,32,60)
This changed the main screen without issue and left the second screen running at 1920 x 1080

I then stopped the project and changed the code to set the resolution back SysChangeScreenResolution(1920,1080,32,60) and re-ran the project init code and it changed back to normal

If it is not working for you, then it may be a video card or driver issue.
It might be interesting to run
ResString is string = SysListVideoCard()
to see if Windev recognises the Video card.

Regards
Al

von Al - am 13.08.2013 14:16
Zur Information:
MySnip.de hat keinen Einfluss auf die Inhalte der Beiträge. Bitte kontaktieren Sie den Administrator des Forums bei Problemen oder Löschforderungen über die Kontaktseite.
Falls die Kontaktaufnahme mit dem Administrator des Forums fehlschlägt, kontaktieren Sie uns bitte über die in unserem Impressum angegebenen Daten.