Cool Things to do in Logon UDCs

This one is really handy in a multiple machine environment. It sets the text of the Reflection Title Bar as the machine name and your logon. This helps you find the correct window when you have multiple sessions on different machines.

  if hpinteractive = true
      if hpldevin <> 20
        setvar _esc chr(27)
        echo !_esc&oFset: window-title " !hpuser.!hpaccount:"
      endif
  endif

I like to use this one as a bulletin board to display messages on the screen for specific users. It is controlled simply by the existence of a flat File. If a file with the USERS name exists in the message group then that file will be displayed on the users terminal when they log on for 7 seconds or until they press the RETURN key, whichever comes first. You could also alter it to look for a specific message for everyone in the Account or even a system wide version.

 if hpinteractive = true
    setvar hpmsgfence 2
    if finfo("!hpuser.message", 0) then
      print !hpuser.message
      echo
      input dummyvar,prompt="Press  to continue";wait=7
    endif
    setvar hpmsgfence 0
  endif