| submitted by Bill Shadish Fundamental Objects, Inc; bills@fo.com Do you have a ton of screens in your application? Do you also have plenty of users who want to "help you" by pointing out buttons that are one twip out of place? Sometimes it's hard to know what screen users are talking about when they're trying to communicate a problem -- particularly if they're in a different location than you. To reduce the pain of this process, I add a label (called lblHeader) to the top of each GUI window, nominally to hold start-up information for users when they first open the window. You can also use this label to hold the name of the window the user is looking at, by using the following code: Private Sub Form_Load() SetupScreen me End Sub Public SetupScreen (frm as Form) ' Do other set-up stuff here (fonts, colors). HookInFormName frm End Sub Public Sub HookInFormName(frm As Form) ' The Resume Next on Error allows forms that do not use a standard header label to get past this. On Error Resume Next frm.lblHeader.Caption = "(" & frm.Name & ") " & frm.lblHeader.Caption End Sub Note that if you don't want to use a label, that you can also use code like frm.print frm.name to print to the back of the window itself |
Labeling your forms |
Express News India | Freelance ecommerce web development India