VFPMisc Forum

  | Discussion |

Bottom | Unframe

how should version information be displayed

From: mda
Keywords: VFPMisc
Date: 10/05/00
Time: 16:19


Question: what is the best way to display version information in a complex, multi-component application, where each sub-application has its own version number.

Objectives and Constraints:

Possible Approaches Under Consideration:

  1. incorporate version into each form's title bar (using its Caption property)
  2. display version # in the body of the form or a page of tabbed form
  3. support a main menu command that displays version of foremost window

My Recommendation:

I've already argued that option #2 would be preferable to #1 (see excerpts of prior emails that follow).  Now let me suggest that you consider option #3 as the simplest of all.  You could implement this by introducing a new form property, say BT_VersionNum, to be added into each sub-application and initialized via the form's property sheet.  Then add a new main menu command called something like About Form..., which would refer to _screen.activeform.BT_VersionNum.  This menu command should be disabled when no such property exists.

Background - excerpts of previous related email about this:

On 9/8/00, Nadya wrote this:
In light of our recent decision about placing version number on the form, I think, we have to add a new property nCurrentVersion to our base form, which would hold the current version, e.g. 1.1, 1.2, etc. We also have to create a method, like, InsertVesrionNumber, which would insert version number into right corner of the title bar. We would call this method in Caption_Assign. The method itself is a little tricky, so if you have ideas, how we can insert version number in the right corner, please, share them.

And on 10/4, Nadya wrote:
Could you please help me in one problem. In order to place Version number at the right corner of the form, we have to know form's title font attributes (name, style, size). Could you please help me to retrieve this information. It should be some Windows API call (GetSystemMetrics?), but I don't have Windows API help book available right now.

To which I replied on 10/4:
Instead of attempting any tricky Windows API gimmicks or other kluges, I would strongly suggest that you take a simpler approach, such as adding a display-only field in the upper right corner of the body of the form or its primary page.

To which Nadya responded on 10/4:
I considered this idea, but this is not universal enough. Form may have overcrowded pageframe, which would not leave space for this label. Assigning Form's Caption is quite simple. I'm currently working on this idea in BtCrit, since it's not our BaseForm. I think, we later can easily add one property nVersion and Caption_Assign method to our BaseForm in wgcontrols, which would take care of Application Version Control (see note in Italic in Alan's document and one of my earliest e-mail about this topic).

Therefore right now I'm having problem of determination Title's Bar font and its attributes. Could you please help me in this specific problem?

To which I replied on 10/4:
If you're just using the form's Caption property, that's simple enough, although space is even more limited, so I'm not sure this is a very good general solution. Recall that XFormDBF uses the caption to display the current configuration's title, so cramming anything more into the title bar would present some problems. If you're contemplating some other method of overlaying information on the title bar, aside from use of the Caption property, I wouldn't recommend anything that cute. Are you just trying to insert enough blanks to force the version # to show up at the right? What happens as the window is resized, or if the caption is too long? I think you should reconsider my suggestion of putting the version information into the form or first page of tabbed form. Adjust the layout as needed to make a small amount of space. This will avoid lots of tricky complications and programming hassles. The usual practice is to provide this information in an About... menu command, which is the least obtrusive alternative. Requiring this to be always visible on the form is the next level of in-your-faceness. But putting the version # in the window title is just about the most extreme level of prominence you could give it, which seems excessive to me.

Nadya made this reply on 10/5:
AFAIK, Nancy & Roberta already tried to implement this Alan's request in Form's or screen caption. I think, we have to find a general approach here, which could be easily implemented for all our applications without any significant changes. I agree, though, that screen or form's caption seems to be not the best place, but implementation of About screen could be even more complicated, than the code, I currently came up. In order to place version number at the right corner of the form's caption, I have to know Windows Title Bar font attributes. This, unfortunately, turns to be a quite complicated task. I have to use GetSystemInfo API function and then structure, therefore use special class for handling structures, etc.

Anyway, I want to discuss this problem and find a best solution here, which would have less impact of current applications (IOW, doesn't require to open each application and made adjustments by hand).

May be we can start this discussion in one of your forums, Mike. Choose appropriate, please.

(this posting in the VFPMisc forum is my reply - see My Recommendation above)


| Top | Unframe | Help |

 | Contents | Discussion |

Brought to you by SpaceTime Systems.  All rights reserved.