ScreenLock
 
Locks the working page's framebuffer

Syntax

Declare Sub ScreenLock ( )

Usage

ScreenLock

Description

The ScreenLock function locks the current work page framebuffer for direct memory access.

Framebuffer memory may be freely accessed (read/write) and primitive graphics statements may be called during the time a screen is locked.

The screen remains locked until the use of ScreenUnlock statement. ScreenLock must only be used on a screen that is unlocked - or in other words, a screen that is not already locked with ScreenLock.

It is strongly recommended that the lock on a page be held for as short a time as possible. Only screen drawing should occur while the screen is locked, input/output and waiting must be avoided.

Once the page is locked, the screen contents will not be automatically updated until the page is unlocked with the ScreenUnlock statement. If the work page is the same as the visible page, any modifications to the page memory while locked will not become visible until ScreenUnlock is called.

Example

See ScreenPtr example.


Dialect Differences

  • Not available in the -lang qb dialect unless referenced with the alias __Screenlock.

Differences from QB

  • New to FreeBASIC

See also