PCDRes example for Visual Basic

This example checks for a high resolution image and loads it if possible.

myfile = "v:\images\img0024.pcd" 'No PCD sample image is included with LEADTOOLS
Dim RasterIO As New LEADRasterIO
Dim Msg
RasterIO.GetFileInfo LEADRasterView1.Raster, "s:\temp\images\pcd\_aiwanit.pcd", 0, 0
If RasterIO.InfoPCDRes(PCDRES_4BASE) = True Then
    RasterIO.PCDRes = PCDRES_4BASE
    Msg = "Loading 1024 x 1536 resolution"
Else
    RasterIO.PCDRes = PCDRES_BASE
    Msg = "Loading 512 x 768 resolution"
End If
MsgBox Msg
MousePointer = 11 ' hourglass
'Turn on the automatic display rectangles and the scroll bars.
LEADRasterView1.AutoSetRects = True
LEADRasterView1.AutoScroll = True
'Load the file.
RasterIO.Load LEADRasterView1.Raster, "s:\temp\images\pcd\_aiwanit.pcd", 0, 0, 1
LEADRasterView1.ForceRepaint
MousePointer = 0 ' default