First, a database that allows the use of Stored Forms in documents does not have a lower case "f" in the $Flags elements of the ICON note. You can access the icon not in a database using
Const NOTE_CLASS_ICON% = &H0010 '*** icon note
Const SPECIAL_ID_NOTE& = &HFFFF0000 ' use in combination w/NOTE_CLASS when calling NSFDbGetSpecialNoteID
Dim iconNoteId&
Dim icondoc As NotesDocument
iconNoteId = SPECIAL_ID_NOTE + NOTE_CLASS_ICON
Set icondoc = db.Getdocumentbyid(iconNoteId)
If InStr(icondoc.Getitemvalue("$Flags")(0), "f") > 0 Then
Print "Database DOES NOT support shared forms"
Else
Print "Database supports shared forms"
End If
Second forms that support or are stored in documents have a flag in the $Info item that indicates it. This item is Rich Text and is not easily view-able in the IDE. However using the DXL version of the file via a synced Oon Disk Project (ODP) you can see it with an XML or Text editor. It looks like the sixth character is either a "I" for normal forms and a "G" for forms that are stored with the documents.
So far I have not built any code to actually test or report on the forms because turning off the capability at the DB level fixes the security issues caused by stored forms.