Nikos(quartz56) and myself have decided to redesign all of our forms to a more "modern" look. So we've made some picks about standard colors we are going to use and what kind of controls etc.
Anyway since we will be re-designing those we thought to ask opinions on how you guys tackle the problem of resizing for different screen resolutions. To see if someone has a better idea or method that we could also use in our forms. To start with i'll tell you a bit on how we've been doing it so far:
1st step: We design all of our forms in a standard resolution: for example 1920x1040(windows taskbar is 40 pixels tall), so the program's windows fill the entire screen except the windows' taskbar.
2nd step: We do a small calculation at the start of each program, depending on the resolution it was designed for. For example:
Code: Select all
Public appWidth := 1920 //the width the form was designed for
Public appHeight := 1080 //the height the form was designed for
Public corWidth := GetDesktopWidth() / appWidth
Public corHeight := GetDesktopHeight() / appHeight
3rd step: on each define of every control we multiply the row,col,width and height with the above ratios. For example:
Code: Select all
DEFINE LABEL LblOne
ROW 10 * corHeight
COL 20 * corWidth
WIDTH 1920 * corWidth
HEIGHT 40 * corHeight
VALUE WEB_MAINFRM[1]
FONTNAME mainFont
FONTSIZE mainFontSize
BACKCOLOR HeaderBackColor
FONTCOLOR HeaderFontColor
CENTERALIGN .T.
VCENTERALIGN .T.
END LABEL
Row=10
Col=20
Width=1920
Height=40
the same values on a 1440x990(a lot of laptops have those)monitor would give:
Row=9.2
Col=15
Width=1440
Height=36.8
It works fine. The big problem is that those forms are not editable in the IDE(make the IDE crash) which takes away so much of our developing time because we have to do everything by typing the forms. (Because of my heavy Visual Studio background and Unreal Engine background - this irritates me very very much. When you've worked with drag n drop - autoresizing IDEs you really cant go back to what we have in harbour in general.)
So excuse my little rant, we would be very interested to know how you guys handle this problem or if you dont handle it all. Maybe someone has a better idea of doing this or we are missing something. Again thanks for all the help everyone has given us so far and we are open for a good discussion.