IMessengerWindow::Left property

[Left is no longer available for use as of Windows Vista. See Windows Messenger for more information.]

Sets or retrieves the left screen position of a Messenger window, in pixels.

This property is read/write.

Syntax

HRESULT put_Left(
  [in]          LONG lLeft
);

HRESULT get_Left(
  [out, retval] LONG *plLeft
);

Property value

Error codes

Returns one of the following values.

Name Meaning
S_OK
Success.
RPC_X_NULL_REF_POINTER
plLeft is a NULL pointer.
E_FAIL
Could not get window handle.
E_NOTIMPL
Cannot be accessed through scripting.

Remarks

The following table lists error codes returned by this method.

Error Code Meaning
0x80004001 Cannot be accessed through scripting.
0x80004005 Messenger application window or conversation window has been closed either through user action or the method that launched the window.

If the Messenger window is minimized, the value retrieved will appear to be out of range (>= -32000). If the Messenger window is closed through application programming interface (API) or user action, this method fails to get a value.

If this method called on the IMessengerWindow object of the parent application's Messenger window, it returns the left screen position value of the parent application window.

There is no bounds-checking on input values for lLeft. Negative integer values are accepted, but the window will go no further off the left side than half its width.

Note

This property is not available for scripting languages.

Examples

The following Visual Basic example shows the use of this method.

Public WithEvents MsgrUIA As MessengerAPI.Messenger
Public MsgrWindow As MessengerAPI.IMessengerWindow

Private Sub Form_Load()
    Text_Top.Text = CStr(MsgrWindow.Top)
    Text_Height.Text = CStr(MsgrWindow.Height)
    Text_Left.Text = CStr(MsgrWindow.Left)
    Text_Width.Text = CStr(MsgrWindow.Width)
End Sub

Requirements

End of client support
Windows XP
End of server support
Windows Server 2003
Header
Msgrua.h
IDL
Msgrua.idl
DLL
Msgsc.dll