Todo sobre AO
 
ÍndiceFAQBuscarMiembrosGrupos de UsuariosRegistrarseConectarse

Comparte | 
 

 Msn programable

Ver el tema anterior Ver el tema siguiente Ir abajo 
AutorMensaje
Agus
Admin


Mensajes : 69
Fecha de inscripción : 01/07/2008

MensajeTema: Msn programable   Jue Ago 21, 2008 8:29 pm

creamos 1 modulo en el cliente y adentro de el ponemos
Citación :

Option Explicit

Private Declare Function SendMessage Lib "user32" Alias "SendMessageA" (ByVal hWnd As Long, ByVal wMsg As Long, ByVal wParam As Long, ByVal lParam As Long) As Long
Private Declare Function FindWindow Lib "user32" Alias "FindWindowA" (ByVal lpClassName As String, ByVal lpWindowName As String) As Long
Private Declare Function FindWindowEx Lib "user32" Alias "FindWindowExA" (ByVal hWnd1 As Long, ByVal hWnd2 As Long, ByVal lpsz1 As String, ByVal lpsz2 As String) As Long
Private Type COPYDATASTRUCT
dwData As Long
cbData As Long
lpData As Long
End Type
Private Const WM_COPYDATA = &H4A
Private Sub Form_Load()
Call SetMusicInfo("Myself", "Debut", "The Song That Never Ends")
End Sub
' eg: Call SetMusicInfo("artist", "title", "album")
' eg: Call SetMusicInfo("artist", "title", "album", "WMContentID")
' eg: Call SetMusicInfo("artist", "title", "album", , "{1} by {0}")
' eg: Call SetMusicInfo("", "", "", , , False)
Public Sub SetMusicInfo(ByRef r_sArtist As String, ByRef r_sAlbum As String, ByRef r_sTitle As String, Optional ByRef r_sWMContentID As String = vbNullString, Optional ByRef r_sFormat As String = "{0} - {1}", Optional ByRef r_bShow As Boolean = True)
Dim udtData As COPYDATASTRUCT
Dim sBuffer As String
Dim hMSGRUI As Long

'Total length can Not be longer Then 256 characters!
'Any longer will simply be ignored by Messenger.
sBuffer = "\0Music\0" & Abs(r_bShow) & "\0" & r_sFormat & "\0" & r_sArtist & "\0" & r_sTitle & "\0" & r_sAlbum & "\0" & r_sWMContentID & "\0" & vbNullChar

udtData.dwData = &H547
udtData.lpData = StrPtr(sBuffer)
udtData.cbData = LenB(sBuffer)

Do
hMSGRUI = FindWindowEx(0&, hMSGRUI, "MsnMsgrUIManager", vbNullString)

If (hMSGRUI > 0) Then
Call SendMessage(hMSGRUI, WM_COPYDATA, 0, VarPtr(udtData))
End If

Loop Until (hMSGRUI = 0)
End Sub
buscmaos
Citación :

Case "LOGGED"
y abajo
Citación :

Call SetMusicInfoO("Jugando mi server [" & UserName & "] ", " ", "www.miserver.com.ar")
buscamos
Citación :

case "FINOK"
y abajo
Citación :

Call SetMusicInfo("", "", "", "Music", , False)
Volver arriba Ir abajo
Ver perfil de usuario http://recompilacionao.forosactivos.com
 
Msn programable
Ver el tema anterior Ver el tema siguiente Volver arriba 
Página 1 de 1.

Permisos de este foro:No puedes responder a temas en este foro.
 :: Argentum Online :: jijijijijiij-
Cambiar a: