exshellview - sample code

How can I list only folders in the view?

VBA (MS Access, Excell...)

With ExShellView1
	.IncludeObjectType = 2
End With

VB6

With ExShellView1
	.IncludeObjectType = FoldersOnly
End With

VB.NET

With Exshellview1
	.IncludeObjectType = exontrol.EXSHELLVIEWLib.IncludeObjectEnum.FoldersOnly
End With

VB.NET for /COM

With AxExShellView1
	.IncludeObjectType = EXSHELLVIEWLib.IncludeObjectEnum.FoldersOnly
End With

C++

/*
	Copy and paste the following directives to your header file as
	it defines the namespace 'EXSHELLVIEWLib' for the library: 'ExShellView 1.0 Control Library'

	#import <ExShellView.dll>
	using namespace EXSHELLVIEWLib;
*/
EXSHELLVIEWLib::IExShellViewPtr spExShellView1 = GetDlgItem(IDC_EXSHELLVIEW1)->GetControlUnknown();
spExShellView1->PutIncludeObjectType(EXSHELLVIEWLib::FoldersOnly);

C++ Builder

ExShellView1->IncludeObjectType = Exshellviewlib_tlb::IncludeObjectEnum::FoldersOnly;

C#

exshellview1.IncludeObjectType = exontrol.EXSHELLVIEWLib.IncludeObjectEnum.FoldersOnly;

JavaScript

<OBJECT classid="clsid:B4E1F234-AF0D-4EAD-8113-A563B40E71CA" id="ExShellView1"></OBJECT>

<SCRIPT LANGUAGE="JScript">
	ExShellView1.IncludeObjectType = 2;
</SCRIPT>

C# for /COM

axExShellView1.IncludeObjectType = EXSHELLVIEWLib.IncludeObjectEnum.FoldersOnly;

X++ (Dynamics Ax 2009)

public void init()
{
	;

	super();

	exshellview1.IncludeObjectType(2/*FoldersOnly*/);
}

Delphi 8 (.NET only)

with AxExShellView1 do
begin
	IncludeObjectType := EXSHELLVIEWLib.IncludeObjectEnum.FoldersOnly;
end

Delphi (standard)

with ExShellView1 do
begin
	IncludeObjectType := EXSHELLVIEWLib_TLB.FoldersOnly;
end

VFP

with thisform.ExShellView1
	.IncludeObjectType = 2
endwith

dBASE Plus

local oExShellView

oExShellView = form.Activex1.nativeObject
oExShellView.IncludeObjectType = 2

XBasic (Alpha Five)

Dim oExShellView as P

oExShellView = topparent:CONTROL_ACTIVEX1.activex
oExShellView.IncludeObjectType = 2

Visual Objects


oDCOCX_Exontrol1:IncludeObjectType := FoldersOnly

PowerBuilder

OleObject oExShellView

oExShellView = ole_1.Object
oExShellView.IncludeObjectType = 2

Visual DataFlex

Procedure OnCreate
	Forward Send OnCreate
	Set ComIncludeObjectType to OLEFoldersOnly
End_Procedure

XBase++

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oExShellView

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oExShellView := XbpActiveXControl():new( oForm:drawingArea )
	oExShellView:CLSID  := "Exontrol.ShellView.1" /*{B4E1F234-AF0D-4EAD-8113-A563B40E71CA}*/
	oExShellView:create(,, {10,60},{610,370} )

		oExShellView:IncludeObjectType := 2/*FoldersOnly*/

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN