GRAPH.Attach |
nControl = GRAPH.Attach( BYVAL hControl AS HANDLE, [BYVAL flags AS INTEGER=NG_Persist] ) AS INTEGER
nControl = GRAPH.Attach( BYVAL environment_var AS STRING, [BYVAL flags AS INTEGER=NG_Persist] ) AS INTEGER
Attaches an existing control to the library so it can be accessed by MyBASIC2. If the persist parameters is set to TRUE (default) then the graph is not closed upon exit from the library.
The following flags have been defined
NG_Persist = 0x0001 ' Don't close the control after script has finished NG_NoOptions = 0x0002 ' Don't load options from registry
Example:
DIM nControl AS INTEGER DIM hControl AS HANDLE
hControl = ENVIRONMENT( "MAXA$CONTROL_1.HANDLE" ) nControl = GRAPH.Attach( hControl ) GRAPH.Detach( nControl )
' Using the alternate version nControl = GRAPH.Attach( "MAXA$CONTROL_1.HANDLE" ) GRAPH.Detach( nControl )
|