What happened to the Messenger Plus! forums on msghelp.net?
Shoutbox » MsgHelp Archive » Messenger Plus! for Live Messenger » Scripting » Plug-Ins » [VB6] Closing MSN messenger

3 votes - 2.67 average   [VB6] Closing MSN messenger
Author: Message:
matty
Scripting Guru
*****


Posts: 8336
Reputation: 109
39 / Male / Flag
Joined: Dec 2002
Status: Away
RE: [VB6] Closing MSN messenger
Only one problem, if you have conversation windows open it wont shut down, it will ask if you wish to close them first.


This is the code I used to close all of the IM Windows, do this before doing the graceful and forceful shutdowns on MSN
code:
Public Declare Function FindWindow Lib "user32" Alias "FindWindowA" (ByVal lpClassName As String, ByVal lpWindowName As String) As Long
Public Declare Function SendMessageLong& Lib "user32" Alias "SendMessageA" (ByVal hWnd As Long, ByVal wMsg As Long, ByVal wParam As Long, ByVal lParam As Long)
Public Const WM_CLOSE = &H10

Public Function closeAll()
Dim imwindowclass As Long
10  imwindowclass = FindWindow("imwindowclass", vbNullString)
    If imwindowclass <> 0 Then
        Call SendMessageLong(imwindowclass, WM_CLOSE, 0&, 0&)
        GoTo 10
    Else: Exit Function
    End If
End Function
07-02-2004 03:04 PM
Profile E-Mail PM Find Quote Report
« Next Oldest Return to Top Next Newest »

Messages In This Thread
[VB6] Closing MSN messenger - by J-Thread on 07-02-2004 at 12:45 PM
RE: [VB6] Closing MSN messenger - by Wouter on 07-02-2004 at 12:59 PM
RE: [VB6] Closing MSN messenger - by Dempsey on 07-02-2004 at 01:11 PM
RE: RE: [VB6] Closing MSN messenger - by J-Thread on 07-02-2004 at 03:15 PM
RE: [VB6] Closing MSN messenger - by Choli on 07-02-2004 at 01:32 PM
RE: [VB6] Closing MSN messenger - by J-Thread on 07-02-2004 at 01:44 PM
RE: [VB6] Closing MSN messenger - by CookieRevised on 07-02-2004 at 01:56 PM
RE: RE: [VB6] Closing MSN messenger - by J-Thread on 07-02-2004 at 02:28 PM
RE: [VB6] Closing MSN messenger - by CookieRevised on 07-02-2004 at 02:31 PM
RE: [VB6] Closing MSN messenger - by J-Thread on 07-02-2004 at 02:33 PM
RE: [VB6] Closing MSN messenger - by CookieRevised on 07-02-2004 at 02:42 PM
RE: [VB6] Closing MSN messenger - by J-Thread on 07-02-2004 at 02:45 PM
RE: [VB6] Closing MSN messenger - by matty on 07-02-2004 at 03:04 PM
RE: [VB6] Closing MSN messenger - by matty on 07-02-2004 at 04:56 PM
RE: [VB6] Closing MSN messenger - by J-Thread on 07-02-2004 at 05:29 PM
RE: [VB6] Closing MSN messenger - by Choli on 07-02-2004 at 05:33 PM
RE: [VB6] Closing MSN messenger - by matty on 07-02-2004 at 05:34 PM
RE: [VB6] Closing MSN messenger - by J-Thread on 07-03-2004 at 08:29 AM
RE: [VB6] Closing MSN messenger - by Choli on 07-03-2004 at 09:21 AM
RE: RE: [VB6] Closing MSN messenger - by J-Thread on 07-03-2004 at 10:49 AM
RE: [VB6] Closing MSN messenger - by Choli on 07-03-2004 at 12:12 PM
RE: [VB6] Closing MSN messenger - by J-Thread on 07-03-2004 at 12:57 PM
RE: [VB6] Closing MSN messenger - by J-Thread on 07-05-2004 at 05:46 PM


Threaded Mode | Linear Mode
View a Printable Version
Send this Thread to a Friend
Subscribe | Add to Favorites
Rate This Thread:

Forum Jump:

Forum Rules:
You cannot post new threads
You cannot post replies
You cannot post attachments
You can edit your posts
HTML is Off
myCode is On
Smilies are On
[img] Code is On