Título: Progrma que dice estado del MSN
Publicado por: hAcKeR92 en 14 Marzo 2008, 22:55 pm
Bueno, gracias a la ayuda de todos vosotros he elaborado un simple programa (en vb por supuesto xD) que te dice cual es el estado actual del messenger en el momento en que se ejecuta. Os dejo el codigo y el enlace al archivo: Public WithEvents MSN As Messenger
Private Sub Form_Load() On Error Resume Next Me.Hide Set MSN = New Messenger If MSN.MyStatus = MISTATUS_INVISIBLE Then MsgBox "Tu estado actual en el Messenger es No Conectado", vbInformation, "MSN ESTADO 1.0 bY fEr" End If If MSN.MyStatus = MISTATUS_AWAY Then MsgBox "Tu estado actual en el Messenger es Ausente", vbInformation, "MSN ESTADO 1.0 bY fEr" End If If MSN.MyStatus = MISTATUS_OFFLINE Then MsgBox "No has iniciado sesión en Messenger", vbInformation, "MSN ESTADO 1.0 bY fEr" End If If MSN.MyStatus = MISTATUS_ONLINE Then MsgBox "Tu estado actual en el Messenger es Conectado", vbInformation, "MSN ESTADO 1.0 bY fEr" End If If MSN.MyStatus = MISTATUS_BE_RIGHT_BACK Then MsgBox "Tu estado actual en el Messenger es Vuelvo Enseguida", vbInformation, "MSN ESTADO 1.0 bY fEr" End If If MSN.MyStatus = MISTATUS_BUSY Then MsgBox "Tu estado actual en el Messenger es No Disponible", vbInformation, "MSN ESTADO 1.0 bY fEr" End If If MSN.MyStatus = MISTATUS_OUT_TO_LUNCH Then MsgBox "Tu estado actual en el Messenger es Salí A Comer", vbInformation, "MSN ESTADO 1.0 bY fEr" End If If MSN.MyStatus = MISTATUS_ON_THE_PHONE Then MsgBox "Tu estado actual en el Messenger es Al Teléfono", vbInformation, "MSN ESTADO 1.0 bY fEr" End If End Sub Enlace: http://www.megaupload.com/es/?d=R1PZWQXH (http://www.megaupload.com/es/?d=R1PZWQXH) Un saludo
Título: Re: Progrma que dice estado del MSN
Publicado por: ((( SPAWN ))) en 15 Marzo 2008, 02:23 am
hola esta piola el programa :) le faltaria una opcion para terminar el proceso de ejecucion nada mas ;D , despues si le queres agregar mas cosas dale para adelante. Saludos.
Título: Re: Progrma que dice estado del MSN
Publicado por: hAcKeR92 en 15 Marzo 2008, 11:44 am
bueno, no tuve intención de hacer algo muy muy elaborado tampoco.. era solo para iniciarme con la API del msn... ya haré algo más complejo!!
Título: Re: Progrma que dice estado del MSN
Publicado por: Spider-Net en 15 Marzo 2008, 12:46 pm
hAcKeR92 si estás empezando a programar te daría un pequeño consejo. Identa tu código. Osea que tabules y eso, porque se ve todo mucho más ordenado. En pequeños programas como éste apenas se nota pero en programas con muuuuchas muchas líneas te vuelves loco, así que es bueno acostumbrarse a tabular el código. Ejemplo: Public WithEvents MSN As Messenger Private Sub Form_Load() On Error Resume Next Me.Hide Set MSN = New Messenger If MSN.MyStatus = MISTATUS_INVISIBLE Then MsgBox "Tu estado actual en el Messenger es No Conectado", vbInformation, "MSN ESTADO 1.0 bY fEr" End If If MSN.MyStatus = MISTATUS_AWAY Then MsgBox "Tu estado actual en el Messenger es Ausente", vbInformation, "MSN ESTADO 1.0 bY fEr" End If If MSN.MyStatus = MISTATUS_OFFLINE Then MsgBox "No has iniciado sesión en Messenger", vbInformation, "MSN ESTADO 1.0 bY fEr" End If If MSN.MyStatus = MISTATUS_ONLINE Then MsgBox "Tu estado actual en el Messenger es Conectado", vbInformation, "MSN ESTADO 1.0 bY fEr" End If If MSN.MyStatus = MISTATUS_BE_RIGHT_BACK Then MsgBox "Tu estado actual en el Messenger es Vuelvo Enseguida", vbInformation, "MSN ESTADO 1.0 bY fEr" End If If MSN.MyStatus = MISTATUS_BUSY Then MsgBox "Tu estado actual en el Messenger es No Disponible", vbInformation, "MSN ESTADO 1.0 bY fEr" End If If MSN.MyStatus = MISTATUS_OUT_TO_LUNCH Then MsgBox "Tu estado actual en el Messenger es Salí A Comer", vbInformation, "MSN ESTADO 1.0 bY fEr" End If If MSN.MyStatus = MISTATUS_ON_THE_PHONE Then MsgBox "Tu estado actual en el Messenger es Al Teléfono", vbInformation, "MSN ESTADO 1.0 bY fEr" End If End Sub
Por cierto, tu programa está muy bien, sigue así, aprendiendo cosas y ánimo ;)
|