Jump to content
dummzeuch

Things that every desktop program should do

Recommended Posts

Whole heartedly agree with you Thomas but if your working with VCL Styles aligned panels work better as I've found anchors do not always compensate for border width changes (even in the IDE, and yes its been reported).

Share this post


Link to post
On 4/3/2019 at 4:56 AM, dummzeuch said:

There are a few things that every single one of our internal programs should do:

  • Every dialog should be sizeable if it makes any sense at all. Delphi makes that easy with the Align and Anchor properties. Ask yourself the following questions. If you answer any of them with Yes, ...

 

https://blog.dummzeuch.de/2019/04/03/things-that-every-desktop-program-should-do/

I would add that any dialog which reports an error condition  should allow the user to copy the text to the clipboard. 

  • Like 2

Share this post


Link to post

Addition: if you have splitters or grid-style listviews with columns, save and restore their settings too

 

Share this post


Link to post

Storing dialog sizes and positions in the registry is not best practice imo and should be stored in %localappdata% or similar

  • Like 2

Share this post


Link to post
12 minutes ago, Stefan Glienke said:

Storing dialog sizes and positions in the registry is not best practice imo and should be stored in %localappdata% or similar

%appdata% surely. But why not the registry? 

Share this post


Link to post
5 minutes ago, David Heffernan said:

%appdata% surely. But why not the registry? 

One reason lies in the answer you just gave opposed to using %localappdata% ... the others you can find on google from various sources.

Share this post


Link to post

I too don't use the registry to store anything. I don't want to be part of the problem that created registry cleaners. And I don't trust uninstallers (or me) to completely free the registry from any thing I might have entered. It is easier to simply delete the %localappdata%\myProduct, for the user too, should I forget that 😉

 

The registry has become the same cluttered monster the win.ini was.

  • Like 2

Share this post


Link to post
Posted (edited)
37 minutes ago, Stefan Glienke said:

One reason lies in the answer you just gave opposed to using %localappdata%

I can't make sense of this. You are implying that HKCU always roams? And that roaming is not appropriate for such settings? 

Edited by David Heffernan

Share this post


Link to post
1 minute ago, David Heffernan said:

I can't make sense of this. You are implying that HKCU always roams? 

The opposite - I suggested %localappdata% but you suggested the better %appdata% which roams - registry does not by default (to my knowledge)

Share this post


Link to post

Stored window sizes and positions (in whatever) should not roam, unless one can be sure that the user always has the same hardware.

That's why I switched to the registry from a centrally stored ini file (the latter could also be questioned, but in this particular case it makes sense to have a common configuration for all users).

Share this post


Link to post
9 minutes ago, Stefan Glienke said:

registry does not by defaul

I understood that HKCU did roam

Share this post


Link to post
Posted (edited)
34 minutes ago, dummzeuch said:

Stored window sizes and positions (in whatever) should not roam, unless one can be sure that the user always has the same hardware.

That's why I switched to the registry from a centrally stored ini file (the latter could also be questioned, but in this particular case it makes sense to have a common configuration for all users).

I don't buy that argument. Your program needs to be able to adapt to changes in screen resolution. When restoring the form layout you must deal with the screen resolution having changed, roaming or not. User can change resolution, font scaling, changes attached monitors, etc. 

 

Having said that, I am sure that an argument could be constructed to justify not having such settings roam.  In fact, using that part of the user profile that resides on the filesystem allows you to choose between roaming and local on a per setting basis.  That's certainly an advantage over HKCU.

Edited by David Heffernan
  • Like 1

Share this post


Link to post
Posted (edited)
26 minutes ago, David Heffernan said:

must deal with the screen resolution having changed, roaming or not

 So true. Everything else is just botching.

 User setting belongs to roaming.

Edited by Attila Kovacs

Share this post


Link to post
6 hours ago, Stefan Glienke said:

registry does not by default

 

from: https://docs.microsoft.com/en-us/windows/win32/sysinfo/predefined-keys

All registry entries in HKEY_CURRENT_USER except those under HKEY_CURRENT_USER\Software\Classes are included in the per-user registry portion of a roaming user profile. To exclude other entries from a roaming user profile, store them in HKEY_CURRENT_USER_LOCAL_SETTINGS.

Share this post


Link to post

So many apps today no longer follows the Windows Theme color settings.  That annoys me.

  • Like 1

Share this post


Link to post
6 minutes ago, Lars Fosdal said:

So many apps today no longer follows the Windows Theme color settings.  That annoys me.

VCL styles anybody? 

Share this post


Link to post
38 minutes ago, Lars Fosdal said:

So many apps today no longer follows the Windows Theme color settings.  That annoys me.

On the good side, they don't support pink goggles, either. 😉

  • Like 1
  • Haha 2

Share this post


Link to post
3 hours ago, Lars Fosdal said:

So many apps today no longer follows the Windows Theme color settings.  That annoys me.

Given some of the available color schemes that might be a feature. 😉

  • Haha 2

Share this post


Link to post

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 account

Sign in

Already have an account? Sign in here.

Sign In Now

×