How to define current aspect ratio (scripting)

Well, I now have a 16:9 monitor, so I thought this might be usefull... You might want to know the aspect ratio of your user.
So, you can use this script to define if it is 4:3, 16:9 or none of them:
I know this might seem a little useless, but you need to know that 4:3 resolutions don't work well with widescreen monitors. So you can use this along with ChangeDisplayResolution to warn the user about the resolution problems.
So, you can use this script to define if it is 4:3, 16:9 or none of them:
- Code: Select all
If GetDisplayResolutionX*3=GetDisplayResolutionY*4 Then
aspectratio = "4:3"
else if GetDisplayResolutionX*9=GetDisplayResolutionY*16 Then
aspectratio = "16:9"
else
aspectratio = "unknown"
end if
end if
I know this might seem a little useless, but you need to know that 4:3 resolutions don't work well with widescreen monitors. So you can use this along with ChangeDisplayResolution to warn the user about the resolution problems.