IMessengerWindow::Show method
[Show is no longer available for use as of Windows Vista. See Windows Messenger for more information.]
Sets the visibility status of a Messenger window.
Syntax
HRESULT Show();
Parameters
This method has no parameters.
Return value
Type: HRESULT
Returns one of the following values.
Return code | Description |
---|---|
|
Success. The window might already have been in that visibility state, in which case no separate code is returned. |
|
Window instance destroyed. |
Remarks
The following table lists error codes returned by this method.
Error Code | Meaning |
---|---|
0x80004005 | Window instance destroyed. |
This method is generally called in cases in which IsClosed returns TRUE. Calling Show will redisplay the Messenger application window or a conversation window (depending on the type of window to which the MessengerWindow object corresponds).
If the last state of the window was minimized by user action, then the window will become both visible and drawn to the last default sizing. A minimized window is the only scenario in which calling Show on a conversation rather than main application window would be useful. Had the conversation window been previously closed, then the object itself would have disappeared. Calling the Show method, or at least verifying that IsClosed does not return TRUE, is a prerequisite to calling a number of other automation interfaces that require a valid window handle. For example, calling Left while the window is closed will return E_FAIL as the HRESULT. The visibility of the Messenger application window is not parallel to the Visible properties and methods implemented in other application automation interfaces, such as the Microsoft Office automation APIs. When the Messenger application window is closed, it is not just sent and processed in the background. A closed Messenger application is sent to the background on the process level (in the notification area), not just on a windowing or display level.
Note
This method is 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 cmd_W_Show_Click()
MsgrWindow.Show
End Sub
Requirements
End of client support |
Windows XP |
End of server support |
Windows Server 2003 |
Header |
|
IDL |
|
DLL |
|