Shoutbox

Plugin Request: Auto-Restoring Conversation Windows - Printable Version

-Shoutbox (https://shoutbox.menthix.net)
+-- Forum: MsgHelp Archive (/forumdisplay.php?fid=58)
+--- Forum: Messenger Plus! for Live Messenger (/forumdisplay.php?fid=4)
+---- Forum: Scripting (/forumdisplay.php?fid=39)
+----- Forum: Plug-Ins (/forumdisplay.php?fid=28)
+------ Thread: Plugin Request: Auto-Restoring Conversation Windows (/showthread.php?tid=40613)

Plugin Request: Auto-Restoring Conversation Windows by Nichol on 03-19-2005 at 05:13 PM

Any chance someone could code a plugin that makes newly created conversation windows automatically restore/maximise? It might seem like an insignificant feature to want, but I personally think this would be great.


RE: Plugin Request: Auto-Restoring Conversation Windows by matty on 03-19-2005 at 05:42 PM

'Being the bored person I am I made a small example. This is the code in Visual Basic on how you would do it. I just don't have the time to make it a plugin.
'Make sure to set a reference to the MessengerAPI Type Library


Public WithEvents MessengerAPI As MessengerAPI.Messenger
Public Declare Function ShowWindow Lib "user32" (ByVal hwnd As Long, ByVal nCmdShow As Long) As Long
Public Const SW_NORMAL = 1
Public Const SW_MINIMIZE = 6
Public Const SW_MAXIMIZE = 3
Public Const SW_SHOWNOACTIVATE = 4

Public Function Initialize(ByVal nVersion As Long, ByVal sUserEmail As String, ByVal oMessenger As Object) As Boolean
    Initialize = True
    Set MessengerAPI = oMessenger
End Function

Private Sub MessengerAPI_OnIMWindowCreated(ByVal pIMWindow As Object)
    Dim IMWindow_Interface As IMessengerConversationWnd
    Set IMWindow_Interface = pIMWindow
   
' This will show the window normally with focus
    ShowWindow IMWindow_Interface.hWnd, SW_NORMAL
' This will maximize the window
    ShowWindow IMWindow_Interface.hWnd, SW_MAXIMIZE
' This will minimize the window
    ShowWindow IMWindow_Interface.hWnd, SW_MINIMIZE
' This will minimize the window
    ShowWindow IMWindow_Interface.hWnd, SW_MINIMIZE
' This will show the window normally without gaining focus
    ShowWindow IMWindow_Interface.hWnd, SW_SHOWNOACTIVATE
End Sub


RE: Plugin Request: Auto-Restoring Conversation Windows by Nichol on 03-19-2005 at 06:42 PM

Thanks for the reply.

Anyone care to make this into a usable plugin? :)


RE: Plugin Request: Auto-Restoring Conversation Windows by albert on 03-20-2005 at 12:13 AM

I would love to I just don't know how :'( where can we learn to program? like fastly..??


RE: Plugin Request: Auto-Restoring Conversation Windows by L. Coyote on 03-20-2005 at 12:15 AM

I'll give it a try. :o

Cyberdude should do it, though.

Edit: in VB6, it worked for a second and then it stopped. I'll try with VB.net (though, it's difficult as hell to make it work :sad:).


RE: Plugin Request: Auto-Restoring Conversation Windows by Nichol on 03-20-2005 at 09:11 AM

Hope someone gets it working. Please reply if you do.