FB II Compiler

PG PRO

Debugging

Memory

System

Mathematics

Resources

Disk I/O

Windows

Controls

Menus

Mouse

Keyboard

Text

Fonts

Drawing

Sound

Clipboard

Printing

Communication

ASM

Made with FB

RESOURCES

Create a counter with resource


tmp$ = STR# (128,6) 'get the sixth string in resource ID 128
t = VAL(tmp$) + 1 'add 1 to it
tmp$ = STR$ (t) 'change it back to a string
hndl& = FN GETRESOURCE (_"STR#",128)'get the handle for resource string
LONG IF hndl& 'do we have a valid handle?
  DEF REMOVESTR (hndl&,6) 'remove and delete the original string
  DEF APNDSTR (tmp$, hndl&) 'add and append new string
  CALL CHANGEDRESOURCE (hndl&) 'tell the program of the change
  CALL RELEASERESOURCE (hndl&) 'release the resource
END IF

tedd