I must admit that I have never been a big fan of using the built-in include files supplied with Notes e.g. lsconst.lss but recently I have started using them to make my code more readable. Using the include file you can write
Dim rc As Integer
rc = Msgbox("Should we continue deleting the contents of your harddrive?", MB_YESNO+MB_ICONQUESTION+MB_DEFBUTTON2, "Continue?")
If rc=IDNO Then
Exit Sub
End If
which is much more readable than the same code without the constants but using magic numbers.
Dim rc As Integer
rc = Msgbox("Should we continue deleting the contents of your harddrive?", 4+32+256, "Continue?")
If rc=7 Then
Exit Sub
End If
Today however I realized that you cannot use the include files in (form) actions since the compiler does not allow the use of the Public keyword. All constants in lsconst.lss is defined as Public so that’s a no go. Copying lsconst.lss to something like friendly_lsconst.lss, removing the use of Public and the reference at the bottom to lsprcval.lss and including the copy instead solves the problem. This restriction isn’t documented in Domino Designer help and severely limits the usability in my mind. Since the constants are inserted at compile time it shouldn’t be a problem.
Below is a screenshot of the compile error from Domino Designer. I’m running Notes 7.0.2 on Windows XP Prof. SP2.

