Sets or retrieves the height of a messenger window. Not scriptable.
Syntax
HRESULT Height( [out, retval] LONG* plHeight ); |
Parameters
- plHeight
-
Pointer to a LONG that receives the height of the messenger window, in pixels.
Return Value
Returns one of the following values. For managed code applications, these return values are received in the form of a COMException.
- S_OK
-
Success.
- RPC_X_NULL_REF_POINTER
-
plHeight is a null pointer.
- E_INVALIDARG
-
You attempted to set the window to zero or a negative width.
- E_FAIL
-
Cannot get a window handle.
- E_NOTIMPL
-
The property cannot be accessed through scripting.
Remarks
If the messenger window is closed (only available from the Taskbar) or not responding, or if the HWND cannot be found, this method fails.
Example
This code example takes the value windowDimensionSpin, a NumericUpDown form control that contains a decimal number in the Value property, converts that value to an int32, and sets the Height property of the Office Communicator UI. The messengerWindow object is an implementation of the IMessengerWindow interface.
The second example reads the Height property of the messengerWindow and displays the value in a console window.
Copy Code | |
---|---|
//SET messengerWindow.Height property messengerWindow = (IMessengerWindow)communicator.Window; try { messengerWindow.Height = Convert.ToInt32(windowDimensionSpin.Value); } catch (COMException CMEH) { Console.WriteLine(CMEH.ErrorCode.ToString()); } //GET messengerWindow.Height property try { Console.WriteLine("Messenger Window Height:" + messengerWindow.Height.ToString(); } catch (COMException CMEH) { Console.WriteLine(CMEH.ErrorCode.ToString()); } |
Requirements
- Client
-
Requires Microsoft DirectX 9.0, C Runtime libraries (msvcm80.dll) on Microsoft Windows© Vista, Microsoft Windows XP Service Pack 1 (SP1) or later, or Microsoft Windows 2000 with Service Pack 4 (SP4). Any Communicator-imposed restrictions apply. .
- Server
-
Requires Microsoft Office Communications Server 2007, AV MCU (for Media Support), Media Relay (for NAT/Firewall traversal) on Microsoft Office Communications Server 2007.
- Product
-
Microsoft Office Communicator 2007 Automation API
- IDL file
-
Msgrua.idl