ComponentOne Bitmap for WinForms
C1.Win.C1DX.4.8 Assembly / C1.Util.DX.WIC Namespace / Bitmap Class / Lock Method / Lock(BitmapLockFlags) Method

The access mode you wish to obtain for the lock. This is a bitwise combination of BitmapLockFlags for read, write, or read and write access.

Value Meaning
BitmapLockFlags.Read

The read access lock.

BitmapLockFlags.Write

The write access lock.

?


In This Topic
    Lock(BitmapLockFlags) Method
    In This Topic

    Provides access to a rectangular area of the bitmap.

    Syntax
    'Declaration
     
    Public Overloads Function Lock( _
       ByVal flags As BitmapLockFlags _
    ) As BitmapLock
    public BitmapLock Lock( 
       BitmapLockFlags flags
    )

    Parameters

    flags

    The access mode you wish to obtain for the lock. This is a bitwise combination of BitmapLockFlags for read, write, or read and write access.

    Value Meaning
    BitmapLockFlags.Read

    The read access lock.

    BitmapLockFlags.Write

    The write access lock.

    ?

    Return Value

    A reference that receives the locked memory location.

    Remarks

    Locks are exclusive for writing but can be shared for reading. You cannot call CopyPixels while the Bitmap is locked for writing. Doing so will return an error, since locks are exclusive.

    See Also