Sample Code

The following sample code shows how to set a document to the first page and how to open a CI document.

‘ Select the first page from the menu
Private Sub mnFirstPage_Click()
  CIDoc.SetFirstPage
End Sub
‘
‘ Select a file to load from the common dialog
Private Sub mnOpenCIDocument_Click()
  On Error GoTo lblErr
  With CommonDialog1
    .DialogTitle = "Load document file"
    .CancelError = True
    .Filter = "All Files(*.*)|*.*"
    .ShowOpen
  End With
  CIDoc.LoadFile CommonDialog1.FileName
  Set SCBCroViewer1.Item = CIDoc
  ' reset mouse pointer
  DoEvents
  MousePointer = 0
Exit Sub

lblErr:
  MsgBox Err.Description
End Sub