*Msn* Listbox With Msn Contacts!
Heres your chance to share your own tutorials with the community. Just post them on here. If your lucky they may even be posted on the main site.
first go to Reference and click Messanger API
the at the top of you're code
-2 buttons (button1 for select chat) and button 2 for refresh
-listbox1 (All online Contacts!)
-textbox1 (selectd contact!)
ok double click on the form_load then put in
the at the top of you're code
Code: Select all
and under public class
Imports MessengerAPI
Code: Select all
then make Dim msn As New MessengerAPI.Messenger
-2 buttons (button1 for select chat) and button 2 for refresh
-listbox1 (All online Contacts!)
-textbox1 (selectd contact!)
ok double click on the form_load then put in
Code: Select all
and in listbox1
Dim cons As IMessengerContacts
Dim con As IMessengerContact
listbox1.Items.Clear()
cons = msn.MyContacts
For Each con In cons
If con.Status <> MISTATUS.MISTATUS_OFFLINE Then
listbox1.Items.Add(con.SigninName)
End If
Next
Code: Select all
and in button1
textbox1.Text = listbox1.Text
Code: Select all
and in button2
msn.InstantMessage(textbox1.Text)
Code: Select all
that was it:P Me.Refresh()
Cool ^^
I've added some more features:
![Image]()
The X [simple]:
Name the Get Current Name Button "btnCurrent"
Name the Set New name Button "btnNew"
Name the Textbox above "TxtNew"
Name the Info About Name label "Lblcurrent"
Ye, i think thats it.
Download my software <3: [You need WinRar to open it!!!]
I've added some more features:

The X [simple]:
Code: Select all
The Online/Offline Button:
Me.Close()
Code: Select all
Form1:
If msn.MyStatus = MISTATUS.MISTATUS_ONLINE Then
Button4.Text = "Offline"
msn.MyStatus = MISTATUS.MISTATUS_INVISIBLE
Else
Button4.Text = "Online"
msn.MyStatus = MISTATUS.MISTATUS_ONLINE
End If
Code: Select all
Public Class Form1:
If msn.MyStatus = MISTATUS.MISTATUS_ONLINE Then
Button4.Text = "Offline"
Else
Button4.Text = "Online"
End If
Dim cons As IMessengerContacts
Dim con As IMessengerContact
ListBox1.Items.Clear()
cons = msn.MyContacts
For Each con In cons
If con.Status <> MISTATUS.MISTATUS_OFFLINE Then
ListBox1.Items.Add(con.SigninName)
End If
Next
Code: Select all
Get Current Name Button:
Dim displayname As New MessengerAPI.Messenger
Public WithEvents msn As New Messenger
Code: Select all
Set New name Button:
Lblcurrent.Text = displayname.myfriendlyname
Code: Select all
THIS IS FOR THE RIGHT PART: displayname.optionsPage(0, MessengerAPI.MOPTIONPAGE.MOPT_GENERAL_PAGE)
SendKeys.Send(TxtNew.Text)
SendKeys.Send("{Enter}")
Name the Get Current Name Button "btnCurrent"
Name the Set New name Button "btnNew"
Name the Textbox above "TxtNew"
Name the Info About Name label "Lblcurrent"
Ye, i think thats it.
Download my software <3: [You need WinRar to open it!!!]
You do not have the required permissions to view the files attached to this post.
Just another day in my life.
http://www.codexvideos.com
http://www.codexvideos.com
I have some problems with the Messenger APIs, I can't use them, I never could, I tried to do enumerous things for MSN and I always had the same troubles in Messenger APIs, I must have some compatibility problems or something since I have Windows 7...
Great tutorial though...
Great tutorial though...
I don't think its because you have have Windows 7, cause thats why i am using.
Have you tried to reinstall windows messager, well if that doesnt work then i can't help you :/
Have you tried to reinstall windows messager, well if that doesnt work then i can't help you :/
Just another day in my life.
http://www.codexvideos.com
http://www.codexvideos.com
Hello Everyone!
This program is very nice but I don't use MSN lol!
Thanks anyways!
This program is very nice but I don't use MSN lol!
Thanks anyways!
Well I reinstalled MSN multiple times but it still doesn't work.
I give up, dam you Microsoft!!!!!
I give up, dam you Microsoft!!!!!
Cheers mate works fine here 

Copyright Information
Copyright © Codenstuff.com 2020 - 2023