Merge.Application Object

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.

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

Properties

Activeread/writeICommonUI

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]

BinaryComparisonread-onlyIApplication

Creates and returns a reference to a new BinaryComparison object.

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

Encodingsread-onlyIApplication2

Creates and returns a reference to a new Encodings object.

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

FolderComparisonread-onlyIApplication

Creates and returns a reference to a new FolderComparison object.

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

Heightread/writeICommonUI

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]

ImageComparisonread-onlyIApplication

Creates and returns a reference to a new ImageComparison object.

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

Leftread/writeICommonUI

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]

Maximizedread/writeICommonUI

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]

Minimizedread/writeICommonUI

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]

Preferencesread-onlyIApplication

Provides access to Merge preferences.

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

TextComparisonread-onlyIApplication

Creates and returns a reference to a new TextComparison object.

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

Topread/writeICommonUI

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]

Versionread-onlyIApplication

The version of Merge being automated. The string is of the format <majorVersion>.<minorVersion>.<buildNumber> (e.g. 7.0.1234).

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

Visibleread/writeICommonUI

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]

Widthread/writeICommonUI

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

CloseICommonUI

Closes the Merge application window.

IDL HRESULT Close()
.NET void Close()

CompareItemsIApplication

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)
  • firstItem
    The name of the first file/folder to be compared.
  • secondItem
    The name of the second file/folder to be compared.
  • thirdItem optional
    The name of the third file/folder to be compared.

GiveUserControlICommonUI

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()

OpenComparisonIApplication

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)
  • filename
    The name of the comparison file that should be opened.

RestoreICommonUI

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

IDL HRESULT Restore()
.NET void Restore()

SaveWorkspaceIApplication4

Saves the open comparisons to a workspace file.

IDL HRESULT SaveWorkspace(
    [in] BSTR filename)
.NET void SaveWorkspace(
    String filename)
  • filename
    The name of the file to which the workspace should be saved. The extension .cmp7 is strongly recommended.