Hide

SftDirectory 3.5 - ActiveX File/Folder Control

Display
Print

SftDirectory.FolderImageReady Event

The requested file/folder image is available.

Syntax

VB.NETPrivate Sub object_FolderImageReady(ByVal sender As Object, ByVal e As EventArgumentType) Handles object.FolderImageReady
VBPrivate Sub object_FolderImageReady(Folder As SftDirectoryFolder, Picture As IPictureDisp)
C#.NETvoid object_FolderImageReady(object sender, EventArgumentType e);
VC++void OnFolderImageReadyobject(ISftDirectoryFolder* Folder, IPictureDisp* Picture);
CHRESULT OnFolderImageReadyobject(ISftDirectoryFolder* Folder, IPictureDisp* Picture);

object

A SftDirectory object.

Folder

Describes the SftDirectoryFolder whose folder image has become available.

Picture

A picture object containing the file/folder image.

Comments

The FolderImageReady event occurs when the requested file/folder image is available.

The Folder.GetImage method starts an asynchronous task which retrieves a file/folder's thumbnail image. Once the image is available, the FolderImageReady event occurs.

Examples

VB.NET

        AxSftDirectory1.CurrentFolder.GetImage()
        LabelInfoTip.Text = AxSftDirectory1.CurrentFolder.InfoTip
    Else
        PictureBox1.Image = Nothing
        LabelInfoTip.Text = ""
    End If
End Sub

Private Sub AxSftDirectory1_FolderImageReady(ByVal sender As Object, ByVal e As AxSftDirectoryLib30._ISftDirectoryEvents_FolderImageReadyEvent) Handles AxSftDirectory1.FolderImageReady
    PictureBox1.Image = OLECvt.ToImage(e.picture)
End Sub

Private Sub CloseButton_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles CloseButton.Click
    Application.Exit()
End Sub

VB6

        SftDirectory1.CurrentFolder.GetImage
        InfoTipLabel.Caption = SftDirectory1.CurrentFolder.InfoTip
    Else
        Set Picture1.Picture = Nothing
        InfoTipLabel.Caption = ""
    End If
End Sub

Private Sub SftDirectory1_FolderImageReady(ByVal Folder As SftDirectoryLib30.ISftDirectoryFolder, ByVal Picture As stdole.IPictureDisp)
    Set Picture1.Picture = Picture
End Sub

C#

        axSftDirectory1.CurrentFolder.GetImage();
        labelInfoTip.Text = axSftDirectory1.CurrentFolder.InfoTip;
    } else {
        pictureBox1.Image = null;
        labelInfoTip.Text = "";
    }
}

private void axSftDirectory1_FolderImageReady(object sender, AxSftDirectoryLib30._ISftDirectoryEvents_FolderImageReadyEvent e) {
    pictureBox1.Image = OLECvt.ToImage(e.picture);
}

private void closeButton_Click(object sender, System.EventArgs e) {
    Application.Exit();
}

C++

    if (currFolder != NULL) {
        currFolder->GetImage();
        m_InfoTipCtrl.SetWindowText(currFolder->InfoTip);
    } else {
        m_InfoTipCtrl.SetWindowText(_T(""));
    }
}

void CFullTreeViewDlg::OnFolderImageReady_SftDirectory1(LPDISPATCH Folder, LPDISPATCH Picture)
{
    ISftDirectoryPtr vDir1 = m_Dir1.GetControlUnknown();

    IPicturePtr pPicture = Picture;

    m_IconCtrl.ShowWindow(SW_HIDE);
    m_BitmapCtrl.ShowWindow(SW_HIDE);

See Also SftDirectory Object | Object Hierarchy


Last Updated 08/13/2020 - (email)
© 2024 Softel vdm, Inc.