English | 日本語
Home > Merge > Merge for Windows > Documentation Contents > FolderComparison Object

FolderComparison Object

This object represents a Merge folder comparison window. The window isn’t necessarily visible on screen and can be used either to perform folder comparison services for a client or to present folder comparisons on the screen to the user.

Use the methods and properties exposed by this object to perform folder comparisons, extract results, and alter the appearance of the folder comparison window.

Properties (implemented by interface ICommonUI)

Active

IDL [propget] HRESULT Active([out, retval] VARIANT_BOOL* pValue)
[propput] HRESULT Active([in] VARIANT_BOOL newValue)
.NET Boolean Active[get, set]
VB6 Active As Boolean

The active state of the comparison window.

The property is read/write.

Height

IDL [propget] HRESULT Height([out, retval] long* pValue)
[propput] HRESULT Height([in] long newValue)
.NET Int32 Height[get, set]
VB6 Height As Long

The height of the comparison window in pixels.

The property is read/write.

Left

IDL [propget] HRESULT Left([out, retval] long* pValue)
[propput] HRESULT Left([in] long newValue)
.NET Int32 Left[get, set]
VB6 Left As Long

The location of the left edge pixel coordinate of the comparison window.

The property is read/write.

Maximized

IDL [propget] HRESULT Maximized([out, retval] VARIANT_BOOL* pValue)
[propput] HRESULT Maximized([in] VARIANT_BOOL newValue)
.NET Boolean Maximized[get, set]
VB6 Maximized As Boolean

The maximized state of the comparison window.

The property is read/write.

Minimized

IDL [propget] HRESULT Minimized([out, retval] VARIANT_BOOL* pValue)
[propput] HRESULT Minimized([in] VARIANT_BOOL newValue)
.NET Boolean Minimized[get, set]
VB6 Minimized As Boolean

The minimized state of the comparison window.

The property is read/write.

Top

IDL [propget] HRESULT Top([out, retval] long* pValue)
[propput] HRESULT Top([in] long newValue)
.NET Int32 Top[get, set]
VB6 Top As Long

The location of the top edge pixel coordinate of the comparison window.

The property is read/write.

Visible

IDL [propget] HRESULT Visible([out, retval] VARIANT_BOOL* pValue)
[propput] HRESULT Visible([in] VARIANT_BOOL newValue)
.NET Boolean Visible[get, set]
VB6 Visible As Boolean

The visible state of the comparison window.

The property is read/write.

Width

IDL [propget] HRESULT Width([out, retval] long* pValue)
[propput] HRESULT Width([in] long newValue)
.NET Int32 Width[get, set]
VB6 Width As Long

The width of the comparison window in pixels.

The property is read/write.

Properties (implemented by interface IComparison)

ViewType

IDL [propget] HRESULT ViewType([out, retval] FileViewType* pValue)
[propput] HRESULT ViewType([in] FileViewType newValue)
.NET FileViewType ViewType[get, set]
VB6 ViewType As FileViewType

The comparison type (two way or three way layout).

The property is read/write.

Properties (implemented by interface IFolderComparison)

Busy

IDL [propget] HRESULT Busy([out, retval] VARIANT_BOOL* pValue)
[propput] HRESULT Busy([in] VARIANT_BOOL newValue)
.NET Boolean Busy[get, set]
VB6 Busy As Boolean

Whether the comparison window is busy performing a folder comparison or retest operation.

The property is read/write.

FileName

IDL [propget] HRESULT FileName([in] long nIndex, [in] short nFolder, [out, retval] BSTR* pValue)
.NET String get_FileName(Int32 nIndex, Int16 nFolder)
VB6 FileName(nIndex As Long, nFolder As Integer) As String

The name of the file at the specified index and column in the comparison results.

The property is read-only.

Arguments

FilePath

IDL [propget] HRESULT FilePath([in] long nIndex, [in] short nFolder, [out, retval] BSTR* pValue)
.NET String get_FilePath(Int32 nIndex, Int16 nFolder)
VB6 FilePath(nIndex As Long, nFolder As Integer) As String

The path and name of the file at the specified index and column in the comparison results.

The property is read-only.

Arguments

FileType

IDL [propget] HRESULT FileType([in] long nIndex, [out, retval] FolderFileType* pValue)
.NET FolderFileType get_FileType(Int32 nIndex)
VB6 FileType(nIndex As Long) As FolderFileType

The type of the file at the specified index in the comparison results.

The property is read-only.

Arguments

Folder

IDL [propget] HRESULT Folder([in] short nFolder, [out, retval] BSTR* pValue)
[propput] HRESULT Folder([in] short nFolder, [in] BSTR newValue)
.NET String get_Folder(Int16 nFolder)
void set_Folder(Int16 nFolder, String newValue)
VB6 Folder(nFolder As Integer) As String

The fully qualified path to the specified folder to be compared.

The property is read/write.

Arguments

FullFilePath

IDL [propget] HRESULT FullFilePath([in] long nIndex, [in] short nFolder, [out, retval] BSTR* pValue)
.NET String get_FullFilePath(Int32 nIndex, Int16 nFolder)
VB6 FullFilePath(nIndex As Long, nFolder As Integer) As String

The fully qualified path and name of the file at the specified index and column in the comparison results.

The property is read-only.

Arguments

NumberOfEntries

IDL [propget] HRESULT NumberOfEntries([out, retval] long* pValue)
.NET Int32 NumberOfEntries[get]
VB6 NumberOfEntries As Long

The number of items in the comparison results. The comparison results contain the items in the same order as displayed to the user in the folder comparison window.

The property is read-only.

NumberOfSelectedItems

IDL [propget] HRESULT NumberOfSelectedItems([out, retval] long* pValue)
.NET Int32 NumberOfSelectedItems[get]
VB6 NumberOfSelectedItems As Long

The number of selected items in the comparison results.

The property is read-only.

Selected

IDL [propget] HRESULT Selected([in] long nIndex, [out, retval] VARIANT_BOOL* pValue)
[propput] HRESULT Selected([in] long nIndex, [in] VARIANT_BOOL newValue)
.NET Boolean get_Selected(Int32 nIndex)
void set_Selected(Int32 nIndex, Boolean newValue)
VB6 Selected(nIndex As Long) As Boolean

Indicates whether the file at the specified index in the comparison results is selected.

The property is read/write.

Arguments

Methods (implemented by interface ICommonUI)

Close

IDL HRESULT Close()
.NET void Close()
VB6 Close

Closes the comparison window.

GiveUserControl

IDL HRESULT GiveUserControl()
.NET void GiveUserControl()
VB6 GiveUserControl

Gives control over the lifetime of the comparison window to the user. Merge will not automatically close the window when outstanding automation references are released.

Restore

IDL HRESULT Restore()
.NET void Restore()
VB6 Restore

Restores the comparison window from minimized or maximised state to its normal resizable state.

Methods (implemented by interface IComparison)

Compare

IDL HRESULT Compare([in] VARIANT strFirst, [in] VARIANT strSecond, [in, optional] VARIANT strThird)
.NET void Compare(Object strFirst, Object strSecond, Object strThird)
VB6 Compare(strFirst As Variant, strSecond As Variant [, strThird As Variant])

Compares two or three folders. This method is synchronous. An event ComparisonComplete is fired when the comparison is finished to report errors and results.

Arguments

Print

IDL HRESULT Print([in] VARIANT_BOOL bShowPrinterDialog, [in] PageOrientation nOrientation)
.NET void Print(Boolean bShowPrinterDialog, PageOrientation nOrientation)
VB6 Print(bShowPrinterDialog As Boolean, nOrientation As PageOrientation)

Prints the folder comparison.

Arguments

Refresh

IDL HRESULT Refresh()
.NET void Refresh()
VB6 Refresh

Recompares the folders displayed in the window.

Report

IDL HRESULT Report([in] BSTR bstrReporter, [in] LineEndingStyle nLineEndingStyle, [in] BSTR strOutputFile)
.NET void Report(String bstrReporter, LineEndingStyle nLineEndingStyle, String strOutputFile)
VB6 Report(bstrReporter As String, nLineEndingStyle As LineEndingStyle, strOutputFile As String)

Generates a report for the folder comparison.

Arguments

Report2

IDL HRESULT Report2([in] BSTR bstrReporter, [in] LineEndingStyle nLineEndingStyle, [in] VARIANT vtEncoding, [in] BSTR strOutputFile)
.NET void Report2(String bstrReporter, LineEndingStyle nLineEndingStyle, Object vtEncoding, String strOutputFile)
VB6 Report2(bstrReporter As String, nLineEndingStyle As LineEndingStyle, vtEncoding As Variant, strOutputFile As String)

Generates a report for the folder comparison.

Arguments

SaveComparison

IDL HRESULT SaveComparison([in] BSTR filename)
.NET void SaveComparison(String filename)
VB6 SaveComparison(filename As String)

Saves the comparison to a file. We recommend that you use the .cmp7 extension in the filename.

Arguments

SetPanelTitles

IDL HRESULT SetPanelTitles([in] VARIANT strFirst, [in] VARIANT strSecond, [in, optional] VARIANT strThird)
.NET void SetPanelTitles(Object strFirst, Object strSecond, Object strThird)
VB6 SetPanelTitles(strFirst As Variant, strSecond As Variant [, strThird As Variant])

Sets the titles shown above the folder columns.

Arguments

Methods (implemented by interface IFolderComparison)

CompareSelected

IDL HRESULT CompareSelected()
.NET void CompareSelected()
VB6 CompareSelected

Opens file comparison windows for the selected files in the comparison list.

DeselectAll

IDL HRESULT DeselectAll()
.NET void DeselectAll()
VB6 DeselectAll

Deselects all the files in the comparison list.

HideEmptyFolders

IDL HRESULT HideEmptyFolders()
.NET void HideEmptyFolders()
VB6 HideEmptyFolders

Hides folders that contain no changed, inserted, or removed files.

Restore

IDL HRESULT Restore()
.NET void Restore()
VB6 Restore

Restores the folder comparison window (undoes the effect of a minimize or maximize).

RetestSelected

IDL HRESULT RetestSelected()
.NET void RetestSelected()
VB6 RetestSelected

Retests the selected files in the comparison list.

SelectAll

IDL HRESULT SelectAll()
.NET void SelectAll()
VB6 SelectAll

Selects all the files in the comparison results.

SelectChanged

IDL HRESULT SelectChanged()
.NET void SelectChanged()
VB6 SelectChanged

Selects all the changed files in the comparison results.

Stop

IDL HRESULT Stop()
.NET void Stop()
VB6 Stop

Stops any ongoing comparisons, retests or refreshes.

Events (implemented by interface IFolderComparisonEvents)

Close

IDL HRESULT Close()
.NET void Close()
VB6 Close

Occurs when the folder comparison window is closed by the user.

FolderComparisonComplete

IDL HRESULT FolderComparisonComplete([in] FolderComparisonResult nResult)
.NET void FolderComparisonComplete(FolderComparisonResult nResult)
VB6 FolderComparisonComplete(nResult As FolderComparisonResult)

Occurs when the folder comparison finishes. The result code can be used to determine the success of the comparison.

Arguments

FolderRetestComplete

IDL HRESULT FolderRetestComplete()
.NET void FolderRetestComplete()
VB6 FolderRetestComplete

Occurs when a folder comparison re-test operation finishes.


Related topics