Unlocks work page's framebuffer
Syntax
Usage
ScreenUnlock [ start_line ] [, end_line ]
Parameters
startline
optional argument specifying first screen line to be updated. If omitted, top screen line is assumed.
endline
optional argument specifying last screen line to be updated. If omitted, bottom screen line is assumed.
Description
ScreenUnlock unlocks the current work page assuming it was previously locked by calling
ScreenLock and lets the system restart updating the screen regularly. When called with
start_line and
end_line , only the screen area between those lines is assumed to have changed, and will be updated.
An internal counter exists that remembers the screen lock state, thus
ScreenUnlock has an effect only on a screen that is locked. A screen that has not been locked with
ScreenLock cannot get unlocked, however
ScreenUnlock still will force an update of given area or full screen.
Calls to
ScreenUnlock must be paired with a matching call to
ScreenLock. Only the first call to
ScreenLock actually performs a locking operation. Subsequent calls to
ScreenLock only increment the counter. Conversely,
ScreenUnlock only decrements the lock counter until it reaches zero at which time the actual unlock operation will be performed. Using
Screen or
ScreenRes will release all locks and set the lock counter back to zero before changing screen modes.
After
ScreenUnlock is called, all graphics statements still may be safely used, OTOH accessing the work page framebuffer directly via
ScreenPtr may only be used after locking the screen again with
ScreenLock.
Warning (Win32, Linux) : The screen is locked by stopping the thread that processes also the OS' events. This means the screen should be locked only for the short time required to redraw it, and no user input will be received while the screen is locked.
Example
Dialect Differences
- Not available in the -lang qb dialect unless referenced with the alias __Screenunlock.
Differences from QB
See also