Loading ...
Sorry, an error occurred while loading the content.

Re: Image List

Expand Messages
  • Kevin Wilson
    Dim objAIL As cAdvancedImagery Dim hIMG As Long Dim objIMG As StdPicture Show the form Me.Visible = True DoEvents Initialize the AIL library Set objAIL =
    Message 1 of 4 , Aug 19, 2008
    View Source
    • 0 Attachment
      Dim objAIL As cAdvancedImagery
      Dim hIMG As Long
      Dim objIMG As StdPicture

      ' Show the form
      Me.Visible = True
      DoEvents

      ' Initialize the AIL library
      Set objAIL = New cAdvancedImagery

      ' Load the image from file
      If objAIL.IO_LoadImage("C:\TEST.BMP", hIMG) = True Then

      ' Convert the image to a format that the ImageList understands
      If objAIL.Convert_ImageToPicture(hIMG, objIMG) = True Then

      ' Add the converted image to the ImageList control
      ImageList1.ListImages.Add 1, "key", objIMG

      ' Display the picture from the ImageList control
      Set Picture1.Picture = ImageList1.ListImages(1).Picture

      Else
      MsgBox "Error Converting Image: " & objAIL.Error_GetLast
      End If

      ' Clean up the loaded file
      objAIL.IO_DestroyImage hIMG

      Else
      MsgBox "Error Loading Image: " & objAIL.Error_GetLast
      End If

      ' Deinitialize the AIL library
      Set objAIL = Nothing
    Your message has been successfully submitted and would be delivered to recipients shortly.