Merge.Application Object

On this page:

Description

This object forms the root of the Merge object model. It is the only object that can be created by automation clients. The methods and properties exposed by this object can be used to alter the appearance of the Merge application window, and to create instances of other objects within the object model.

Please see the Introduction to the Automation API for examples of using this object from a variety of languages.

Properties

Active read/write, ICommonUI

The active state of the Merge application window.

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

BinaryComparison read-only, IApplication

Creates and returns a reference to a new BinaryComparison object.

IDL [propget] HRESULT BinaryComparison([out, retval] IBinaryComparison** pValue)
.NET BinaryComparison BinaryComparison[get]

Encodings read-only, IApplication2

Creates and returns a reference to a new Encodings object.

IDL [propget] HRESULT Encodings([out, retval] IEncodings** pValue)
.NET Encodings Encodings[get]

FolderComparison read-only, IApplication

Creates and returns a reference to a new FolderComparison object.

IDL [propget] HRESULT FolderComparison([out, retval] IFolderComparison** pValue)
.NET FolderComparison FolderComparison[get]

Height read/write, ICommonUI

The height of the Merge application window in pixels.

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

ImageComparison read-only, IApplication

Creates and returns a reference to a new ImageComparison object.

IDL [propget] HRESULT ImageComparison([out, retval] IImageComparison** pValue)
.NET ImageComparison ImageComparison[get]

Left read/write, ICommonUI

The location of the left edge pixel coordinate of the Merge application window.

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

Maximized read/write, ICommonUI

Indicates whether the Merge application window is maximized.

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

Minimized read/write, ICommonUI

Indicates whether the Merge application window is minimized.

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

Preferences read-only, IApplication

Provides access to Merge preferences.

IDL [propget] HRESULT Preferences([out, retval] IPreferences** pValue)
.NET Preferences Preferences[get]

TextComparison read-only, IApplication

Creates and returns a reference to a new TextComparison object.

IDL [propget] HRESULT TextComparison([out, retval] ITextComparison2** pValue)
.NET TextComparison TextComparison[get]

Top read/write, ICommonUI

The location of the top edge pixel coordinate of the Merge application window.

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

Version read-only, IApplication

The version of Merge being automated. The string is of the format <major>.<minor>.<patch> (e.g. 2025.1.0). Merge 2024 and earlier releases return 7 for the major version.

IDL [propget] HRESULT Version([out, retval] BSTR* pValue)
.NET String Version[get]

Visible read/write, ICommonUI

Indicates whether the Merge application window is visible.

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

Width read/write, ICommonUI

The width of the Merge application window in pixels.

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

Methods

Close ICommonUI

Closes the Merge application window.

IDL HRESULT Close()
.NET void Close()

CompareItems IApplication

Compares two or three files or folders using the most appropriate type of comparison window. Returns an object representing a file or folder comparison.

IDL HRESULT CompareItems(
    [in] VARIANT firstItem,
    [in] VARIANT secondItem,
    [in, optional] VARIANT thirdItem,
    [out, retval] IComparison** pValue)
.NET IComparison CompareItems(
    Object firstItem,
    Object secondItem,
    Object thirdItem)

GiveUserControl ICommonUI

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

IDL HRESULT GiveUserControl()
.NET void GiveUserControl()

OpenComparison IApplication

Opens a previously saved .cmp7 or .Comparison7 file, containing a saved file or folder comparison, or workspace. The current state of Merge options will be overwritten by the state of Merge options when the file was created.

IDL HRESULT OpenComparison(
    [in] BSTR filename)
.NET void OpenComparison(
    String filename)

Restore ICommonUI

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

IDL HRESULT Restore()
.NET void Restore()

SaveWorkspace IApplication4

Saves the open comparisons to a workspace file.

IDL HRESULT SaveWorkspace(
    [in] BSTR filename)
.NET void SaveWorkspace(
    String filename)