Underlay example for Visual Basic

This example loads a bitmap into Raster2 and uses it as a tiled underlay for LEADRasterView1.

Dim Factory As New LEADRasterFactory
Dim Raster2 As LEADRaster
Dim szLic As String
Dim RasterIO As New LEADRasterIO
Dim RasterProc As New LEADRasterProcess

szLic = "LEADTOOLS OCX Copyright (c) 1991-2005 LEAD Technologies, Inc." & vbCrLf & vbCrLf
Set Raster2 = Factory.CreateObject("LEADRaster.LEADRaster", szLic)

RasterIO.Load Raster2, "d:\lead14\dist\images\ulay1.bmp", 0, 0, 1
RasterProc.Underlay LEADRasterView1.Raster, Raster2, UNDERLAY_TILE
LEADRasterView1.ForceRepaint