Hide

SftDirectory 3.5 - ActiveX File/Folder Control

Display
Print

SftDirectory.TopMostFolderSpecial Property

Defines the topmost folder displayed using predefined values.

Syntax

Get

VB.NETFolderSpecial = object.TopMostFolderSpecial As SftDirectorySpecialFolderConstants
VBFolderSpecial = object.TopMostFolderSpecial As SftDirectorySpecialFolderConstants
C#.NETSftDirectorySpecialFolderConstants FolderSpecial = object.TopMostFolderSpecial;
VC++enum SftDirectorySpecialFolderConstants FolderSpecial = object->TopMostFolderSpecial;
enum SftDirectorySpecialFolderConstants FolderSpecial = object->GetTopMostFolderSpecial();
CHRESULT object->get_TopMostFolderSpecial(enum SftDirectorySpecialFolderConstants* FolderSpecial);

Put

VB.NETobject.TopMostFolderSpecial = FolderSpecial As SftDirectorySpecialFolderConstants
VBobject.TopMostFolderSpecial = FolderSpecial As SftDirectorySpecialFolderConstants
C#.NETSftDirectorySpecialFolderConstants object.TopMostFolderSpecial = FolderSpecial;
VC++enum SftDirectorySpecialFolderConstants object->TopMostFolderSpecial = FolderSpecial;
void object->PutTopMostFolderSpecial(enum SftDirectorySpecialFolderConstants FolderSpecial);
CHRESULT object->put_TopMostFolderSpecial(enum SftDirectorySpecialFolderConstants FolderSpecial);

object

A SftDirectory object.

FolderSpecial

Defines the topmost folder displayed using a folder's system-independent CSIDL. CSIDL values provide a system-independent method to identify special folders. SftDirectorySpecialFolderConstants describes all available CSIDL values:

FolderSpecialValueDescription
specialSftDirectoryNone-1None
specialSftDirectoryAdminTools48AdminTools (*)
specialSftDirectoryAltStartup29AltStartup
specialSftDirectoryAppData26AppData (*)
specialSftDirectoryRecycleBin10RecycleBin
specialSftDirectoryCDBurnArea59CDBurnArea (6.0)
specialSftDirectoryCommonAdminTools47Common AdminTools (*)
specialSftDirectoryCommonAltStartup30Common AltStartup
specialSftDirectoryCommonAppData35Common AppData (*)
specialSftDirectoryCommonDesktop25Common Desktop
specialSftDirectoryCommonDocuments46Common Documents (*)
specialSftDirectoryCommonFavorites31Common Favorites
specialSftDirectoryCommonMusic53Common Music (6.0)
specialSftDirectoryCommonPictures54Common Pictures (6.0)
specialSftDirectoryCommonPrograms23Common Programs
specialSftDirectoryCommonStartMenu22Common StartMenu
specialSftDirectoryCommonStartUp24Common StartUp
specialSftDirectoryCommonTemplates45Common Templates
specialSftDirectoryCommonVideo55Common Video (6.0)
specialSftDirectoryControlPanel3ControlPanel
specialSftDirectoryCookies33Cookies (*)
specialSftDirectoryDesktop0Desktop
specialSftDirectoryDesktopDirectory16DesktopDirectory
specialSftDirectoryMyComputer17My Computer
specialSftDirectoryFavorites6Favorites
specialSftDirectoryFonts20Fonts
specialSftDirectoryHistory34History (*)
specialSftDirectoryInternet1Internet
specialSftDirectoryInternetCache32InternetCache (*)
specialSftDirectoryLocalAppData28Local AppData (*)
specialSftDirectoryMyDocumentsDesktop12My Documents Desktop Item (6.0)
specialSftDirectoryMyMusic13My Music
specialSftDirectoryMyPictures39My Pictures (*)
specialSftDirectoryMyVideos14My Videos (6.0)
specialSftDirectoryMyNetworkNeighborhood19My Network Neighborhood
specialSftDirectoryNetworkNeighborhood18Network Neighborhood
specialSftDirectoryMyDocuments5My Documents (*)
specialSftDirectoryPrinters4Printers
specialSftDirectoryPrintHood27PrintHood
specialSftDirectoryProfile40Profile (5.0)
specialSftDirectoryProfiles62Profiles (6.0)
specialSftDirectoryProgramFiles38Program Files (*)
specialSftDirectoryCommonProgramFiles43Common Program Files (*)
specialSftDirectoryPrograms2Programs
specialSftDirectoryRecent8Recent
specialSftDirectorySendTo9SendTo
specialSftDirectoryStartMenu11StartMenu
specialSftDirectoryStartup7Startup
specialSftDirectorySystem37System (*)
specialSftDirectoryTemplates21Templates
specialSftDirectoryWindows36Windows (*)
specialSftDirectoryConnections49Connections (6.0)
specialSftDirectoryComputersNearMe61Computers Near Me (6.0)
specialSftDirectoryPhotoAlbums69PhotoAlbums (Vista+)
specialSftDirectoryPlayLists63PlayLists (Vista+)
specialSftDirectoryResources56Resources (Vista+)
specialSftDirectorySampleMusic64Sample Music (Vista+)
specialSftDirectorySamplePictures66Sample Pictures (Vista+)
specialSftDirectorySamplePlayLists65Sample PlayLists (Vista+)
specialSftDirectorySampleVideos67Sample Videos (Vista+)
specialSftDirectoryEmpty999Empty

Comments

The TopMostFolderSpecial property defines the topmost folder displayed using predefined values.

The control's contents are loaded and displayed using the folder's system-independent CSIDL.

Examples

VB.NET

    ' If the selection in the left tree changes, update right side detaillist
    UpdateLeftButtons()
    AxSftDirectoryRight.Clear()
    AxSftDirectoryRight.CancelMode()
    AxSftDirectoryRight.Refresh()
    If Not AxSftDirectoryLeft.CurrentFolder Is Nothing Then
        AxSftDirectoryRight.TopMostFolderIDL = AxSftDirectoryLeft.CurrentFolder.ItemIDList
    Else
        AxSftDirectoryRight.TopMostFolderSpecial = SftDirectorySpecialFolderConstants.specialSftDirectoryEmpty
    End If
End Sub

Private Sub AxSftDirectoryRight_Opening(ByVal sender As Object, ByVal e As AxSftDirectoryLib30._ISftDirectoryEvents_OpeningEvent) Handles AxSftDirectoryRight.Opening
    Dim F As SftDirectoryFolder
    Dim IDL As String
    ' we're about to open a file/folder.  If we can add the folder on the

VB6

    ' If the selection in the left tree changes, update right side detaillist
    UpdateLeftButtons
    SftDirectoryRight.Clear
    SftDirectoryRight.CancelMode
    SftDirectoryRight.Refresh
    If Not SftDirectoryLeft.CurrentFolder Is Nothing Then
        SftDirectoryRight.TopMostFolderIDL = SftDirectoryLeft.CurrentFolder.ItemIDList
    Else
        SftDirectoryRight.TopMostFolderSpecial = specialSftDirectoryEmpty
    End If
End Sub

Private Sub SftDirectoryRight_Opening(Folder As SftDirectoryLib30.ISftDirectoryFolder, Allow As Boolean)
    Dim F As SftDirectoryFolder
    Dim IDL As String
    ' we're about to open a file/folder.  If we can add the folder on the

C#

    // If the selection in the left tree changes, update right side detaillist
    UpdateLeftButtons();
    axSftDirectoryRight.Clear();
    axSftDirectoryRight.CancelMode();
    axSftDirectoryRight.Refresh();
    if (axSftDirectoryLeft.CurrentFolder != null)
        axSftDirectoryRight.TopMostFolderIDL = axSftDirectoryLeft.CurrentFolder.ItemIDList;
    else
        axSftDirectoryRight.TopMostFolderSpecial = SftDirectorySpecialFolderConstants.specialSftDirectoryEmpty;
}

private void axSftDirectoryRight_Opening(object sender, AxSftDirectoryLib30._ISftDirectoryEvents_OpeningEvent e) {
    SftDirectoryFolder f;
    String IDL;
    // we're about to open a file/folder.  If we can add the folder on the
    // left side, that means we don't need to open it in a separate window

C++

    UpdateLeftButtons();
    vDirRight->Clear();
    vDirRight->CancelMode();
    vDirRight->Refresh();
    if (vDirLeft->CurrentFolder != NULL)
        vDirRight->TopMostFolderIDL = vDirLeft->CurrentFolder->ItemIDList;
    else
        vDirRight->TopMostFolderSpecial = specialSftDirectoryEmpty;
}

void CSimpleExplorerDlg::OnOpening_SftDirectoryRight(LPDISPATCH FAR* Folder, BOOL FAR* Allow)
{
    ISftDirectoryFolderPtr f = *Folder;
    _bstr_t bstrIDL;
    ISftDirectoryPtr vDirLeft = m_DirLeft.GetControlUnknown();

See Also SftDirectory Object | Object Hierarchy


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