Google

Wednesday, May 9, 2007

About My favourite Band

I love this song.

Lyrics
Unknown man
Speaks to the world
Sucking your trust
A trap in every world
War for territory
War for territory

Choice control
Behind propaganda
Poor information
To manage your anger
Dictators speech
Blasting off your life
Rule to kill the urge
Dumb assholes speech
Years of fighting
Teaching my son
To believe in that man
Racist human being
Racist ground will live
Shame and regret
Of the pride
Youve once possessed

http://www.youtube.com/watch?v=61yn5N5VksA

Tuesday, May 1, 2007

Using MSN’s API with VB.NET

Open VS and then create a new VB.NET "Windows Forms" project.After creating the project add a reference to Interop.MessengerAPI.dll .

Import the Namespace

Imports MessengerAPI


Create an instance of MessengerClass

Public msn As New MessengerAPI.MessengerClass
Public msnwindow As MessengerAPI.IMessengerWindow


Now all methods can be called directly. Here I used two textboxes one for email and one for password.


Sample code for Sign in

Try
msnwindow = CType(msn.Window, MessengerAPI.IMessengerWindow)
msn.Signin(CType(msnwindow.HWND, Integer), txtemail.Text, txtpassword.Text)
Catch ex As Exception
MsgBox(ex.Message)
End Try


For MSN API events you can add your own handlers.


AddHandler msn.OnMyStatusChange, AddressOf msn_OnMyStatusChange



Private Sub msn_OnMyStatusChange(ByVal hr As Integer, ByVal mMyStatus As MISTATUS)

' code to handle status change
End Sub