exfileview - sample code

How do I bold specified files or folders?

VBA (MS Access, Excell...)

With ExFileView1
	With .FileTypes.Add("*")
		.Folder = True
		.Bold = True
		.Apply 
	End With
End With

VB6

With ExFileView1
	With .FileTypes.Add("*")
		.Folder = True
		.Bold = True
		.Apply 
	End With
End With

VB.NET

With Exfileview1
	With .FileTypes.Add("*")
		.Folder = True
		.Bold = True
		.Apply()
	End With
End With

VB.NET for /COM

With AxExFileView1
	With .FileTypes.Add("*")
		.Folder = True
		.Bold = True
		.Apply()
	End With
End With

C++

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

	#import <ExFileVw.dll>
	using namespace EXFILEVIEWLib;
*/
EXFILEVIEWLib::IExFileViewPtr spExFileView1 = GetDlgItem(IDC_EXFILEVIEW1)->GetControlUnknown();
EXFILEVIEWLib::IFileTypePtr var_FileType = spExFileView1->GetFileTypes()->Add(L"*");
	var_FileType->PutFolder(VARIANT_TRUE);
	var_FileType->PutBold(VARIANT_TRUE);
	var_FileType->Apply();

C++ Builder

Exfileviewlib_tlb::IFileTypePtr var_FileType = ExFileView1->FileTypes->Add(L"*");
	var_FileType->Folder = true;
	var_FileType->Bold = true;
	var_FileType->Apply();

C#

exontrol.EXFILEVIEWLib.FileType var_FileType = exfileview1.FileTypes.Add("*");
	var_FileType.Folder = true;
	var_FileType.Bold = true;
	var_FileType.Apply();

JavaScript

<OBJECT classid="clsid:F26C97E5-3E86-4CE4-935B-A997AB3DDBE4" id="ExFileView1"></OBJECT>

<SCRIPT LANGUAGE="JScript">
	var var_FileType = ExFileView1.FileTypes.Add("*");
		var_FileType.Folder = true;
		var_FileType.Bold = true;
		var_FileType.Apply();
</SCRIPT>

C# for /COM

EXFILEVIEWLib.FileType var_FileType = axExFileView1.FileTypes.Add("*");
	var_FileType.Folder = true;
	var_FileType.Bold = true;
	var_FileType.Apply();

X++ (Dynamics Ax 2009)

public void init()
{
	COM com_FileType;
	anytype var_FileType;
	;

	super();

	var_FileType = COM::createFromObject(exfileview1.FileTypes()).Add("*"); com_FileType = var_FileType;
		com_FileType.Folder(true);
		com_FileType.Bold(true);
		com_FileType.Apply();
}

Delphi 8 (.NET only)

with AxExFileView1 do
begin
	with FileTypes.Add('*') do
	begin
		Folder := True;
		Bold := True;
		Apply();
	end;
end

Delphi (standard)

with ExFileView1 do
begin
	with FileTypes.Add('*') do
	begin
		Folder := True;
		Bold := True;
		Apply();
	end;
end

VFP

with thisform.ExFileView1
	with .FileTypes.Add("*")
		.Folder = .T.
		.Bold = .T.
		.Apply
	endwith
endwith

dBASE Plus

local oExFileView,var_FileType

oExFileView = form.Activex1.nativeObject
var_FileType = oExFileView.FileTypes.Add("*")
	var_FileType.Folder = true
	var_FileType.Bold = true
	var_FileType.Apply()

XBasic (Alpha Five)

Dim oExFileView as P
Dim var_FileType as P

oExFileView = topparent:CONTROL_ACTIVEX1.activex
var_FileType = oExFileView.FileTypes.Add("*")
	var_FileType.Folder = .t.
	var_FileType.Bold = .t.
	var_FileType.Apply()

Visual Objects

local var_FileType as IFileType

var_FileType := oDCOCX_Exontrol1:FileTypes:Add("*")
	var_FileType:Folder := true
	var_FileType:Bold := true
	var_FileType:Apply()

PowerBuilder

OleObject oExFileView,var_FileType

oExFileView = ole_1.Object
var_FileType = oExFileView.FileTypes.Add("*")
	var_FileType.Folder = true
	var_FileType.Bold = true
	var_FileType.Apply()

Visual DataFlex

Procedure OnCreate
	Forward Send OnCreate
	Variant voFileTypes
	Get ComFileTypes to voFileTypes
	Handle hoFileTypes
	Get Create (RefClass(cComFileTypes)) to hoFileTypes
	Set pvComObject of hoFileTypes to voFileTypes
		Variant voFileType
		Get ComAdd of hoFileTypes "*" to voFileType
		Handle hoFileType
		Get Create (RefClass(cComFileType)) to hoFileType
		Set pvComObject of hoFileType to voFileType
			Set ComFolder of hoFileType to True
			Set ComBold of hoFileType to True
			Send ComApply of hoFileType
		Send Destroy to hoFileType
	Send Destroy to hoFileTypes
End_Procedure

XBase++

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

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

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

	oExFileView := XbpActiveXControl():new( oForm:drawingArea )
	oExFileView:CLSID  := "Exontrol.ExFileView.1" /*{F26C97E5-3E86-4CE4-935B-A997AB3DDBE4}*/
	oExFileView:create(,, {10,60},{610,370} )

		oFileType := oExFileView:FileTypes():Add("*")
			oFileType:Folder := .T.
			oFileType:Bold := .T.
			oFileType:Apply()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
Copyright 1999-2017 Exontrol. All rights reserved.