Click here to Skip to main content
15,306,376 members
Articles / Web Development / XHTML
Posted 12 Sep 2008


35 bookmarked

Instant Messenger Status Indicator - AIM, Yahoo, ICQ, MSN, Skype ...

Rate me:
Please Sign up or sign in to vote.
5.00/5 (15 votes)
12 Sep 2008CPOL
IM status indicator is as an easy and reliable way to check online status of certain instant messenger account like yahoo, msn, aol, skype and icq..


IM status indicator is as an easy and reliable way to check online status of a certain instant messenger account like Yahoo, AOL, MSN, Skype and ICQ. You can create your own IM status indicator to know who is online without logging into the specific messager.

This indicator ask for the protocol (Name of the messenge) and screen name (Messenger Id) and returns an image url that tells whether the user is online or offline.

The picture below show how it looks like.

Using the Code

It is very simple to create and use IM status indicator. Following are the steps to create IM status indicator.

  • Step 1. Open Microsoft Visual Studio. Create a web site and named it IMStatusIndicator.
  • Step 2.Create an .aspx file and named it IMStatusChech.aspx.
  • Step 3. Design the form that looks like this.
  • FormDesign.gif
  • Step 4. And write the code below
			// Now double click on btnGetStatus button and write 
			// the code below 

protected void btnGetStatus_Click(object sender, EventArgs e)
        string Status = "";

        if (txtScreenName.Text.Trim() != string.Empty)
            Status = GetIMStatus();
        lblStatus.Text = Status;

private string GetIMStatus()
        if (rdbYahoo.Checked)
            return GetIMStatus("yahoo", txtScreenName.Text);
        else if (rdbMsn.Checked)
            return GetIMStatus("msn", txtScreenName.Text);
        else if (rdbAol.Checked)
            return GetIMStatus("aol", txtScreenName.Text);
        else if (rdbICQ.Checked)
            return GetIMStatus("icq", txtScreenName.Text);
        else if (rdbSkype.Checked)
            return GetIMStatus("skype", txtScreenName.Text);
        else return "";

// GetIMStatus is an overloaded method that asks for protocot, name of the messenger and
// messenger id and returns the online/offline image that tells the status.

private string GetIMStatus(string Protocol, string ScreenName) 
        string Status = "";
        switch (Protocol)
            case "yahoo":
                Status = "<img src=\"" +
                    ScreenName  +"&m=g&t=0\" border=\"0\">";

            case "msn":
                Status = "<img src=\""+
                    ScreenName +"/" +
                    "msnonline.png/" +


            case "aol":
                Status = "<img src=\""+
                   ScreenName +"?on_url=" +
                   style=\"border: none;\" alt=\"My status\" />";

            case "icq":
                Status = "<img src=\"" +
                   ScreenName  +"&img=26\" />";

            case "skype":
                Status = "<img src=\"" +
                    ScreenName + "border=\"1\" />";
        return Status;

Now run the project and select one of the protocol,Messanger and enter messenger id, click on the button and get the status as result. 

Here is the output.........



This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


About the Author

Najmul Hoda
Software Developer (Senior) Birla Soft
India India
Najmul Hoda is a Master of Computer Application.
He has worked with .Net technologies in web development and has been programming since 2007.
He is very comfortable in various languages,RDBMS,C# to VB.NET with Access & MS SQLServer from Javascript,AJAX to ASP.NET, MVC.

Khata Wata (Free Online Udhar Khata, Bahi Khata)
Download from play store

Comments and Discussions

Questioninvisible Pin
amertarekt1-Jan-12 23:53
Memberamertarekt1-Jan-12 23:53 
QuestionHow to get the status message instead of images? Pin
Inbam4-Sep-09 12:25
MemberInbam4-Sep-09 12:25 
AnswerSite work on my computer Pin
RAND 4558664-Feb-11 23:54
MemberRAND 4558664-Feb-11 23:54 
General.h files to deal with Yahoo applications Pin
ex_zarzor17-May-09 13:11
Memberex_zarzor17-May-09 13:11 
GeneralMy vote of 2 Pin
kataras18-Feb-09 6:08
Memberkataras18-Feb-09 6:08 
Generalnot working Pin
kataras18-Feb-09 6:07
Memberkataras18-Feb-09 6:07 
GeneralThis one too Pin
Vimalsoft(Pty) Ltd13-Feb-09 2:22
professionalVimalsoft(Pty) Ltd13-Feb-09 2:22 
GeneralGoogle Talk and add a Button to trigger IM to talk if online Pin
Member 44306722-Feb-09 20:14
MemberMember 44306722-Feb-09 20:14 
Generalcan't check invisible status in yahoo Pin
Member 253427515-Dec-08 5:37
MemberMember 253427515-Dec-08 5:37 
GeneralRe Pin
budarin15-Sep-08 22:54
Memberbudarin15-Sep-08 22:54 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.