GdiPlusAbort interface

An object that GDI+ can ask whether a long operation should stop.

GdiPlusAbort declares one method, Abort. A class that implements it can be passed to Image.SetAbort, which hands it to GDI+. It mirrors the GdiplusAbort interface of GDI+ 1.1.

Class StopWhenAsked
    Implements GdiPlusAbort

    Public StopNow As Boolean

    Private Function GdiPlusAbort_Abort() As Long Implements GdiPlusAbort.Abort
        Return If(StopNow, 1, 0)
    End Function
End Class

Abort

Syntax: object.Abort( ) As Long

GDI+ calls it from time to time during a long operation on the image. Returning a value other than 0 asks GDI+ to stop the operation; returning 0 lets it go on.

See Also

  • Image class – SetAbort
  • Graphics class – SetAbort, which takes a raw pointer
  • Types – the types of the package