Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Newcomers DBPro Corner / Choosing a resolution.

Author
Message
Jase
19
Years of Service
User Offline
Joined: 8th Apr 2005
Location: England
Posted: 16th Apr 2005 10:37 Edited at: 16th Apr 2005 10:42
Is there a better way of letting the user choose a resolution than the way i'm doing it?
Thanks


set window off
perform checklist for display modes
dim width(checklist quantity())
dim height(checklist quantity())
dim depth (checklist quantity())
print "choose a resolution..." : print
for l=1 to checklist quantity()
width(l)=checklist value a(l)
height(l)=checklist value b(l)
depth(l)=checklist value c(l)
print str$(l)+". "+checklist string$(l)
next l
input m
set display mode width(m),height(m),depth(m)
cls : print checklist string$(m) : wait key

MetalMackey
RiiDii
19
Years of Service
User Offline
Joined: 20th Jan 2005
Location: Inatincan
Posted: 16th Apr 2005 11:42
I usually just choose something easy like "lose weight" or "stop drinking". It doesn't matter much because I never keep them anyway.
.
.
.
Oh! You meant screen resolution.

That's pretty straight forward. Unless by "better" you mean graphical presentation wise (i.e a gui interface and whatnot), then - probably not a much better way. Good job there.

"Droids don't rip your arms off when they lose." -H. Solo
REALITY II
Dark Flame
19
Years of Service
User Offline
Joined: 15th Feb 2005
Location: England
Posted: 16th Apr 2005 21:05 Edited at: 16th Apr 2005 21:06
hmm..dunno

Jase
19
Years of Service
User Offline
Joined: 8th Apr 2005
Location: England
Posted: 16th Apr 2005 22:43
Are all the rsolutions 3d? I seem to get resolutions of 320x240 and 400x300 but i'm sure my card can't do 3d in less than 640x480 (thats the lowest other apps/games seem to detect for 3d).

MetalMackey
NanoBrain
19
Years of Service
User Offline
Joined: 20th Jan 2005
Location: Portland, OR
Posted: 17th Apr 2005 11:25 Edited at: 17th Apr 2005 11:27
Jase,

I have attached source code of a program created that allows you to use the arrow keys to select a certain display mode, which is a list of avaiable display modes for the user's system. The program is a bit hefty and moderately advanced. However, I have placed plenty of REM statements within it to help you understand what the program is doing.

There are two types of commands I introduce in the program. The first is string manipulation commands. Since the checklist string$() command gives you only a string, and no values, then this string must be manipulated to check what each character is, so that each mode string can be seperated as values to switch the display mode.

Lastly, I introduce ASCII character commands. This function must be used to find the true value of each character within the string. This is the only way to divide the string into seperate values.

When I have more time, if you are at a loss of understaning my program, then I will explain the program in tutorial form. I have added in this code snippet below, a program which prints to the screen all ASCII keyboard values. Make use of it.



+NanoBrain+
NanoBrain
19
Years of Service
User Offline
Joined: 20th Jan 2005
Location: Portland, OR
Posted: 17th Apr 2005 11:42 Edited at: 17th Apr 2005 18:16
Jase,

Hmmm...the code works fine, except that even though it is set up to only allow the user to choose available display modes, when using the program myself, on some modes my monitor will display the words 'Out of Range'. This will come to be a problem, since the graphics card isn't in sync with the monitors limitations. I hope that there is way around this.

+NanoBrain+
Jase
19
Years of Service
User Offline
Joined: 8th Apr 2005
Location: England
Posted: 18th Apr 2005 05:31
Thanks NanoBrain, i understood the code.

MetalMackey

Login to post a reply

Server time is: 2024-09-23 17:33:18
Your offset time is: 2024-09-23 17:33:18