have to declare them in each source, then just create your own "Residents"
file of them. Here's how:
(1) Create a new PureBasic source, called something like MyResidents.pb, and
put all your desired custom constants inside it, such as:
Code: Select all
#NetWork_Event_Failed = 0
#NetWork_Event_Success = 1
#PB_Window_Standard = 1 | 13107200 ; #PB_Window_ScreenCentered | #PB_Window_SystemMenu
new ones... which is why I've had to use "1 | 13107200" above, in place of
"#PB_Window_ScreenCentered | #PB_Window_SystemMenu".

(2) Create a new batch file, in the same folder as your MyResidents.pb, called
MyResidents.bat, with its contents like this (not forgetting to change the paths
to your PureBasic installation folder as required):
Code: Select all
"C:\Program Files\PureBasic\Compilers\pbcompiler.exe" MyResidents.pb /resident MyResidents.res
move MyResidents.res "C:\Program Files\PureBasic\Residents\"
pause
now instantly usable in all your sources! When you want to add more such
constants, just edit MyResidents.pb, save it, and run the batch file again.
