ReadyState Example VB

This example demonstrates how the ReadyState property can be captured and generate a message box indicating the current state of the control.

When the Thumbnail control completes downloading a file, the file will also be displayed in the Imgedit control.

Private Sub ImgThumbnail1_ReadyStateChange(ReadyState As Long)
    sCaption = "Ready State"
    Select Case ImgThumbnail1.ReadyState
        Case 0
            MsgBox "Control is initializing and retrieving properties.", , sCaption
        Case 2
            MsgBox "Control is initialized; download has started.", , sCaption
            ImgThumbnail1.ClearThumbs   'Clear control during download
        Case 4
            MsgBox "Control is ready.", , sCaption
            ImgEdit1.Image = ImgThumbnail1.Image
    End Select
End Sub