Oilify example for Visual Basic

Note: Also works with Access 95 and 97.

This example applies an oil-painting effect and repaints the image. The progress event is enabled because this the Oilify method, with a neighborhood of 10, is slow.

'Declare the RasterProcess object WithEvents
Public WithEvents RasterProc As LEADRasterProcess
'.....
Set RasterProc = New LEADRasterProcess
RasterProc.EnableProgressEvent = True
RasterProc.Oilify LEADRasterView1.Raster, 10
LEADRasterView1.ForceRepaint

Private Sub RasterProc_ProgressStatus(ByVal iPercent As Integer)
    Me.Caption = CStr(iPercent)
End Sub