Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How should developers cope with so many GUI configuration combinations?

These days, any decent Windows desktop application must perform well and look good under the following conditions:

  1. XP and Vista and Windows 7.
  2. 32 bit and 64 bit.
  3. With and without Themes.
  4. With and without Aero.
  5. At 96 and 120 and perhaps custom DPIs.
  6. One or more monitors (screens).
  7. Each OS has its own preferred font.

Oh my! What is a lowly little Windows desktop application developer to do? :(

I'm hoping to get a thread started with suggestions on how to deal with this GUI dilemma.

First off, I'm on Delphi 7.
a) Does Delphi 2010 bring anything new to the table to help with this situation?
b) Should we pick an aftermarket component suite and rely on them to solve all these problems?
c) Should we go with an aftermarket skinning engine?
d) Perhaps a more HTML-type GUI is the way to go. Can we make a relatively complex GUI app with HTML that doesn't require using a browser? (prefer to keep it form based)
e) Should we just knuckle down and code through each one of these scenarios and quit bitching about it?
f) And finally, how in the world are we supposed to test all these conditions?


2 Answers

For the moment I would like to answer only one question:

f) Use virtual machines and (if possible) automated tests. I know it is a big job to set this up but you will never regret.

like image 101
Uwe Raabe Avatar answered Sep 15 '25 11:09

Uwe Raabe


I, too, am a lowly Windows developer (D7) - much more interested in solving my vertical market application user's problems than coping with M$ foibles.

I cobbled up up a component to deal with all with these issues, plus some more.

As far as I know, all the pieces were in the public domain, and I have credited them where possible.

These are some of the properties:

type TAppEnvironment = class(TComponent)

private

{ Private declarations }

// environment management

FEnvError              : TEnvError;          // environment error code
FEnvErrorMsg           : string;             // environment error message
FEnvLocalComputerName  : string;             // name of the client computer
FEnvCurrentUserName    : string;             // logged-on user
FEnvCurrentUserAdmin   : Boolean;            // is logged-on user Admin?
FEnvProduct            : string;             // windows edition
FEnvProductFlavour     : string;             // windows flavour (Home/Pro)
FEnvBuildNumber        : string;             // windows build number
FEnvServicePack        : string;             // windows service pack
FEnvThemeActive        : Boolean;            // Windows Theme active

// calc using product & theme

FEnvTitleHeight        : integer;            // window title height
FEnvMenuHeight         : integer;            // window menu height
FEnvStatusHeight       : integer;            // window status bar height
FEnvBorderHeight       : integer;            // window border height
FEnvMainHeight         : integer;            // main menu window height
FEnvMainWidth          : integer;            // main menu window width
FEnvHeightAdjust       : integer;            // window height adjust
FEnvWidthAdjust        : integer;            // window width adjust
FEnvLocalPath          : string;             // App exe home folder
FEnvAppFolderName      : string;             // application name less extension
FEnvAppFileVersionStr  : string;             // like 6.0.0.4567
FEnvAppFileVersion     : TFileVersion;       // HiVersion, LoVersion, etc.

And some utilities:

function EnvironmentReady : TEnvError;
function GetLocalComputerName : string;             // network needs this
function GetAppFolderName : string;
function BuildNumber : Integer;
procedure GetFileInfo(const AFileName: string; var RFileInfo: TFileInfo);
function GetLocalPath : string;
procedure getEnvWindowAdjust(bar : TStatusBar);
function setAppFileVersionStr : string;
function GetFileTime(const FileName: string): LongInt;
function initEnvironment : Boolean;
function exitEnvironment : Boolean;
function AlreadyRunning : Boolean;
function specialBuild : Boolean;

I have a function to size each form correctly, using FEnvTitleHeight, etc.

All the dumb user paths are also generated, depending on Windows version.

I have no clue as to how to manage the process, but if people want, I will toss the whole thing into the pot - so that the masters can work it over.

like image 35
Dave Wallace Avatar answered Sep 15 '25 11:09

Dave Wallace