I maintain the version and copyright info in Project Properties. Is there a way to access that data from code? I would like to include the version and copyright info on an About form, but would like to pull it from project properties so I don't have to maintain it in two places.
Check out the Help file under "Special Functions". You can reference the built-in App variable.
' Common info that the programmer can access via the global APP variable.
Type APP_TYPE
Comments As Asciiz * %MAX_PATH ' Comments
CompanyName As Asciiz * %MAX_PATH ' Company Name
EXEName As Asciiz * %MAX_PATH ' EXE name of program
FileDescription As Asciiz * %MAX_PATH ' File Description
hInstance As Long ' Instance handle of the program
Path As Asciiz * %MAX_PATH ' Current Path to the EXE
ProductName As Asciiz * %MAX_PATH ' Product Name
LegalCopyright As Asciiz * %MAX_PATH ' Legal Copyright
LegalTrademarks As Asciiz * %MAX_PATH ' Legal Trademarks
ProductMajor As Long ' Product Major number
ProductMinor As Long ' Product Minor number
ProductRevision As Long ' Product Revision number
ProductBuild As Long ' Product Build number
FileMajor As Long ' File Major number
FileMinor As Long ' File Minor number
FileRevision As Long ' File Revision number
FileBuild As Long ' File Build number
ReturnValue As Long ' User value returned from FF_FormClose
End Type
Global App As APP_TYPE
Hello Sean,
attached is a small example with an About box that uses version and copyright info from the file.
BTW,
the box can be used as Splash screen and as About box.
Thanks for your help.