← Foro de Visual Basic

Ayuda hago un Tools Para el Msn Messenger

Hilo en el foro de Visual Basic · 22 de Enero del 2003 · 1 respuestas
LINDA22 de Enero del 2003
Pregunta
Solo queria preguntar como demonios puedo hacerle para cambiar el nick del MSN Messenger pero desde Vb es que estoy haciendo un cliente pero no logro que cambie el nick esta es la rutina que estoy utilizando pero no me funciona


On Error GoTo key

If Check1.Value = 1 Then
Dim TEMP As String
TEMP = MsgrUIA.MyFriendlyName
End If
If Check2.Value = 1 Then
MsgrUIA.MyStatus = MISTATUS_INVISIBLE
ChangeNick Text2.Text
MsgrUIA.MyStatus = MISTATUS_ONLINE
MsgrUIA.MyStatus = MISTATUS_INVISIBLE
Else
MsgrUIA.MyStatus = MISTATUS_INVISIBLE
ChangeNick Text3.Text
MsgrUIA.MyStatus = MISTATUS_ONLINE
MsgrUIA.MyStatus = MISTATUS_INVISIBLE
MsgrUIA.MyStatus = MISTATUS_ONLINE
End If
If Not TEMP = "" Then
ChangeNick TEMP
End If
TEMP = ""
Exit Sub
key:
MsgBox Err.Description, vbCritical, "Nick Error" & Err.Number


Respuestas 1

Linda22 de Enero del 2003
esto va en un modulo:

--------------------------------------------------------------------------------

Public Property Let FriendlyName(ByVal sNewFriendlyName As String)
Dim x&, button&, edit As Long
objMessenger.OptionsPages 0, MOPT_GENERAL_PAGE
x = FindWindow("#32770", vbNullString)
x = FindWindowEx(x, 0, "#32770", vbNullString)
edit = FindWindowEx(x, 0, "edit", vbNullString)
Call SendMessageByString(edit, WM_SETTEXT, 0, sNewFriendlyName)
x = FindWindow("#32770", vbNullString)
button = FindWindowEx(x, 0, "button", vbNullString)
Call SendMessageLong(button, WM_KEYDOWN, VK_SPACE, 0)
Call SendMessageLong(button, WM_KEYUP, VK_SPACE, 0)
End Property

--------------------------------------------------------------------------------

segun como se usa:
FriendlyName = "nick"
¿Buscas más hilos como este? Mira el foro de Visual Basic o usa el buscador.