Click here to Skip to main content
15,883,883 members
Articles / Multimedia / GDI+
Article

MSN Messenger Timer AddIn

Rate me:
Please Sign up or sign in to vote.
3.00/5 (5 votes)
18 Nov 2007MIT2 min read 29K   373   21   1
An article on Messenger AddIn development using Timers

Screenshot - msn.gif

Screenshot - SelectAddIn.gif

Introduction

This code is an Add-In for MSN Live Messenger. It updates the system time on the Messenger status after every second. It is useful in allowing the user to perform a scheduled task and notify the target user even when the source user is not available. This concept can be used widely to read Web Services, XML feeds or any database Stored Procedure to work in the same way as services.

Background

As I was looking at this MSN Addin, I found that there are many hidden functionalities which are possible as its interface MessengerClient.dll is accessible to developers. People can do virtually anything, they can even turn off the target system. But the article suggested that only interface class function is accessible. Therefore I tried to work on this interesting application as now a days, it is used everywhere for communication.

Using the Code

This class TimeUpdate implements the Messenger Client Class. This code creates a Messenger Client Object and a Timer Object. timer is set to trigger after every 1000 milliseconds which allows the date to be updated. You can even change other parameters (such as name, display picture, etc.) as well. MessengerClient library is provided with MSN Live Messenger in c:/Program Files/MSN Messenger folder. To use the plugin, you need to enable the registry plugin option as used in WindowsLiveMessengerAddin article. I have pasted the steps as below.

If you want to begin programming your own new feature into MSN, you are going to try and test the plug-in. This will not work. If you remember what I said a few lines earlier, "It isn't enabled by default." To enable the feature, you must create or adapt a key in your registry: HKEY_CURRENT_USER\SOFTWARE\Microsoft\MSNMessenger\AddInFeatureEnabled must be set to 1. To turn it off, you must delete it or change its value to 0.

Now add the AddIn through MSN Messenger Options. Tools>Options>AddIns>Add To Messenger. After adding the DLL file, you need to turn on the Add-In by Selecting it from Personal Status Drop Down List.

C#
Private MessengerClient client = null;
Timer timer = null; 

C#
//Default initializer from interface 
class public void Initialize(MessengerClient messenger) 
{ 
    Client = messenger; timer = new Timer(); 
    timer.Elapsed += new ElapsedEventHandler(Timer_Tick); 
    timer.Interval = 1000; 
    timer.Start(); 
    Client.Shutdown += new EventHandler(Client_ShutDown); 
}

// Timer tick event
 public void Timer_Tick(object sender, ElapsedEventArgs args)
 { 
    Client.AddInProperties.PersonalStatusMessage = DateTime.Now.ToString(); 
 }

Points of Interest

It is a code just for fun and users may find it of no use to show the time in Messenger as they can see it more easily. But the idea is to provide a way to develop an intelligent Messenger which could do any task remotely. Most of the organizations block network connection while leaving the MSN port which could prove handy.

History

  • 19th November, 2007 - Original version

About Talha Ekram

A code worm just trying to interfere in every aspect of programming.

License

This article, along with any associated source code and files, is licensed under The MIT License


Written By
Web Developer
Pakistan Pakistan
My code is free to download and alter as per your program requirement;

BS Computer Science from FAST NU Karachi, Pakistan

Comments and Discussions

 
Generalbad word filter to protect my kids. with [***********] 's Pin
ZUPERKOOL7-Feb-10 7:53
ZUPERKOOL7-Feb-10 7:53 

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.