timmyboobear Posted October 25, 2015 Posted October 25, 2015 Hello, Is there an efficient way of handling this?The thing is, I have to be able to publish my program for different screen resolutions.For example;screenresolutionperson1 = 2000*1000screenresolutionperson2 = 1000*500Some pseudo code to explain it:$coords = Scanforcolour(0,0,x,y, COLOURCODE)if coords[0] == 700 And coords[1] == 500 thenExcecute() The coordinates of person2 will be different from person1 his coords.Any ideas?Thanks.
czardas Posted October 25, 2015 Posted October 25, 2015 (edited) Look in the macro reference for @ScreenHeight and @ScreenWidth. Then calculate the ratios needed. Edited October 25, 2015 by czardas operator64 ArrayWorkshop
MilesAhead Posted October 25, 2015 Posted October 25, 2015 If the program window or Gui keeps the same aspect ratio in all resolutions then you might simply calculate the percentage of desktop width and height for resolutions that are compatible. If it is designed for a 16x9 res and the user switches to a 4x3 res or another then you may have to take into account the aspect ratio of that resolution's desktop during the calculations. As example I have a window placement sizer utility that is dirt simple. The user manually sizes the window then saves it. Rather than put pixel width and height in the .ini file I save the Window's position and percentage of screen height used and percentage of screen width used. Changing to another res at least results in the window being totally on the desktop. Not chopped. Also there was an old tool that resized the program's main window to simulate various resolutions so you could get an idea how it looked, if the controls were chopped etc., without actually changing the screen res during development. I don't remember the name of it though. My Freeware Page
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now