|
Post by xxgeek on Nov 12, 2023 17:02:00 GMT
In order to change the display resolution at will we will need 3rd party help. www.majorgeeks.com/files/details/qres.htmlQRES.exe has been around for years and works quite well. It will either change the resolution to what you code it to, or if that resolution is not available for your video card it will do nothing. Download the QRES.exe file and place it in the same folder as the code below is RUN from. Experiment to find all the resolutions that DO work for your video card. The resolutions provided in the code examples work here, but may not work for your video card. To get a list of resolutions that DO work for you, go into your Display Settings, and click on the drop down box labeled "Display Resolution" The following code is an example to show what QRES can do. Uncomment one of the RUN lines to check if it works for you in that resolution. If the resolution chosen is not supported, nothing happens. 'download QRES.exe and put it in the same folder as this code is run from 'https://www.majorgeeks.com/files/details/qres.html 'change display resolution at will
nomainwin 'run "QRes.exe /x 1366 /y 768" 'run "QRes.exe /x 1920 /y 1080" 'run "QRes.exe /x 1600 /y 1200" 'run "QRes.exe /x 1600 /y 900" 'run "QRes.exe /x 1400 /y 1050" 'run "QRes.exe /x 1280 /y 1024" 'run "QRes.exe /x 1280 /y 720" 'run "QRes.exe /x 1152 /y 864" 'run "QRes.exe /x 1024 /y 768" 'run "QRes.exe /x 800 /y 600" end
|
|
|
Post by tsh73 on Nov 12, 2023 19:32:55 GMT
I used to put lots of shortcuts on a desktop, like launch menu. In win XP. It happened that Windows does not have native way to save/restore icon arrangement. Changing display resolution breaks it. So now I'd rather not to.
Does it still the same with win 10/11?
Just tested on win10 While icons get garbled then resulution got lower, they did jump to previous places then resolution was restored. Nice thing to know.
|
|
|
Post by xxgeek on Nov 13, 2023 14:27:16 GMT
The desktop icons in Win 10 Pro are ok after a restore as well. I can't test for Win 11 or any other windows version.
Too bad there is a delay between one setting and the next with a black screen. It would have more usefulness if it was instant with no black screen. Plus, if x and y could start at 0 and increment 1 pixel at a time to max res it would be useful as a kind of zoom.
As is, it is useful for changing the resolution for a specified program, and to restore default res when it closes.
Something to play around with....
|
|
|
Post by xxgeek on Dec 5, 2023 19:27:33 GMT
Got some more information from the help file. (Reading help files does help sometimes ) 'download QRES.exe and put it in the same folder as this code is run from 'https://www.majorgeeks.com/files/details/qres.html 'change display resolution at will
nomainwin 'run "cmd.exe /k QRes.exe /L" 'Lists ALL possible resolutions of the installed video hardware. 'run "cmd.exe /k QRes.exe /x 1366 /y 768 /D /V" ' /D = no registry entries made /V = No version info is displayed 'run "cmd.exe /c QRes.exe /x 1366 /y 768" 'run "cmd.exe /k QRes.exe /S" ' displays the current resolution, bit rate, refresh rate 'run "cmd.exe /k QRes.exe /x 1920 /y 1080" 'cmd.exe /k leaves the command window open 'run "cmd.exe /c QRes.exe /x 1920 /y 1080" 'cmd.exe /c closes the command window when finished changing resolution 'run "cmd.exe /c QRes.exe /x 1600 /y 1200 /D" 'run "cmd.exe /c QRes.exe /x 1600 /y 900" /D" 'run "cmd.exe /c QRes.exe /x 1400 /y 1050" /D" 'run "cmd.exe /c QRes.exe /x 1280 /y 1024" /D" 'run "cmd.exe /c QRes.exe /x 1280 /y 720" /D" 'run "cmd.exe /c QRes.exe /x 1152 /y 864" /D" 'run "cmd.exe /c QRes.exe /x 1024 /y 768" /D" 'run "cmd.exe /c QRes.exe /x 800 /y 600" /D" end
'QRes /? 'displays the help menu for QRES 'QRes /H 'displays a bit more help
'syntax 'QRES [/X:[px]] [/Y:[px]] [/C:[bits] [/R:[rr]] [/S] [/L] [/D] [/V] [/?] [/H]
' /X Width in pixels. ' /Y Height in pixels. ' /C Color depth. ' 4 = 16 colors. ' 8 = 256 colors. ' 16= High color. ' 24= True color. ' 32= True color. ' /R Refresh rate. ' /S Show current display settings. ' /L List all display modes. ' /D Does NOT save display settings in the registry.. ' /V Does NOT display version information. ' /? Displays usage information. ' /H Displays more help.
'Example: "QRes.exe /x:640 /c:8" Changes resolution to 640 x 480 and the color depth to 256 colors.
|
|
|
Post by xxgeek on Dec 6, 2023 20:41:28 GMT
A GUI for QRes.
Lists all the available resolutions for your graphics hardware. Allows user to select and change to another resolution.
'GUI for QRes 'by xxgeek Nov 2023 'change display resolution at will
'download QRES.exe and put it in the same folder as this code is run from 'https://www.majorgeeks.com/files/details/qres.html
'Esc or Alt+F4 closes the window when in focus, as well as the top item in the list 'EXIT' 'F4 alone drops the combobox list '+ = increase font size - = decrease font size X = close program
dim res$(500) nomainwin WindowWidth = 850:WindowHeight = 58 UpperLeftX= int((DisplayWidth-WindowWidth)/2) UpperLeftY= int((DisplayHeight-DisplayHeight))+10 button #res.incFont, "&+", [incFont], UL, 250, 1, 30, 25 button #res.decFont, "&-", [decFont], UL, 280, 1, 30, 25 button #res.close, "&X", [quit.res], UL, 310, 1, 30, 25 combobox #res.resolution, res$(), resSelected , 0, 0, 250, 30 open "Built-In" for dialog_popup as #res #res "trapclose [quit.res]" gosub [getResolutions] #res "font 12 bold" mainFontsize = 12 run "cmd.exe /c QRes.exe /L > reslist.res",hide 'Lists ALL possible resolutions of the installed video hardware. gosub [check] wait
[quit.res] close #res end
[getResolutions] x=1 if fileExists(DefaultDir$, "reslist.res") then open "reslist.res" for input as #1 while eof(#1) = 0 line input #1, res$(x) x=x+1 wend close #1 res$(0) = " Available Resolutions" res$(1) = " " res$(2) = "" #res.resolution "reload" #res.resolution "! R E S O L U T I O N S" end if return end
'resize window font - sets all fonts equal [incFont] mainFontsize = mainFontsize + 1 #res.resolution "font ";mainFontsize;" bold" wait
[decFont] mainFontsize = mainFontsize - 1 #res.resolution "font ";mainFontsize;" bold" wait
[check] do scan loop until fileExists(DefaultDir$, "reslist.res") return
sub resSelected res$ #res.resolution "selection? selectedRes$" if selectedRes$ <> " " and selectedRes$ <> " Available Resolutions" then x$ = word$(selectedRes$, 1 , "x") y$ = word$(selectedRes$, 1, ",") : y$ = word$(y$, 2, "x") run "cmd.exe /c QRes /x ";x$;" /y ";y$;" /D /C:16",hide end if #res.resolution "! R E S O L U T I O N S" end sub
'Verify file existence function function fileExists(path$, filename$) dim fileExistsInfo$(0,0) files path$, filename$, fileExistsInfo$() fileExists = val(fileExistsInfo$(0, 0)) 'non zero is true end function
'################################################################# 'QRes /? 'displays the help menu for QRES 'QRes /H 'displays a bit more help
'syntax 'QRES [/X:[px]] [/Y:[px]] [/C:[bits] [/R:[rr]] [/S] [/L] [/D] [/V] [/?] [/H]
' /X Width in pixels. ' /Y Height in pixels. ' /C Color depth. ' 4 = 16 colors. ' 8 = 256 colors. ' 16= High color. ' 24= True color. ' 32= True color. ' /R Refresh rate. ' /S Show current display settings. ' /L List all display modes. ' /D Does NOT save display settings in the registry.. ' /V Does NOT display version information. ' /? Displays usage information. ' /H Displays more help.
'Example: "QRes.exe /x:640 /c:8" Changes resolution to 640 x 480 and the color depth to 256 colors.
'run "cmd.exe /k QRes.exe /x 1366 /y 768 /D /V" ' /D = no registry entries made /V = No version info is displayed 'run "cmd.exe /c QRes.exe /x 1366 /y 768" 'run "cmd.exe /k QRes.exe /S" ' displays the current resolution, bit rate, refresh rate 'run "cmd.exe /k QRes.exe /x 1920 /y 1080" 'cmd.exe /k leaves the command window open 'run "cmd.exe /c QRes.exe /x 1920 /y 1080" 'cmd.exe /c closes the command window when finished changing resolution 'run "cmd.exe /c QRes.exe /x 1600 /y 1200 /D" 'run "cmd.exe /c QRes.exe /x 1600 /y 900" /D" 'run "cmd.exe /c QRes.exe /x 1400 /y 1050" /D" 'run "cmd.exe /c QRes.exe /x 1280 /y 1024" /D" 'run "cmd.exe /c QRes.exe /x 1280 /y 720" /D" 'run "cmd.exe /c QRes.exe /x 1152 /y 864" /D" 'run "cmd.exe /c QRes.exe /x 1024 /y 768" /D" 'run "cmd.exe /c QRes.exe /x 800 /y 600" /D"
'#############################################################
|
|