RE: How to start off a plugin and how to make it simply change your name
'This is just an example of using the Visual Basic Input Box on the Initialize Function to set the new name.
Public strNewUserName As String
Public blnNameChange As Boolean
Public Function Initialize(ByVal nVersion As Long, ByVal sUserEmail As String, ByVal oMessenger As Object) As Boolean
Initialize = True
strNewUserName = InputBox("Enter New Name","Enter New Name", "Enter New Name")
If strNewUserName = "" Or strNewUserName = "Enter New Name" Then
MsgBox "Please Select A Different Name"
Else
blnNameChange = SetNewName(strNewUserName)
End If
End Function
'If you are confused abuot what each of the variables passed through initialize are then please read the following.
'//////////////////////////////////////////////////////////////////////
'//
'// Purpose: Initialization function
'//
'// Definition:
'// This function is called when Messenger starts and each time a
'// different user signs-in in Messenger.
'//
'// Parameters:
'// * nVersion: plugin support version. This will be used in the
'// future to identify different levels of support. Messenger
'// Plus! 3.20 sets this value to 5.
'// * sUserEmail: email of the current user in Messenger. If
'// Messenger is not signed-in, this parameter is the email of
'// the last user who signed in. Messenger Plus! uses this value
'// to load its own settings.
'// * oMessenger: Messenger COM interface. The type of this object
'// is "Messenger". For more information, consult the public
'// Messenger API documentation on Microsoft's web site.
'// * return value: if your initialization is successfull, return
'// True to notify Messenger Plus! that the plugin is ready to
'// use.
'//
'// Plugin Version Index:
'// Messenger Plus! 2.20: 1
'// Messenger Plus! 2.21: 2
'// Messenger Plus! 2.50: 3
'// Messenger Plus! 3.00: 4
'// Messenger Plus! 3.20: 5
'//
'//////////////////////////////////////////////////////////////////////
'The above documentation is located in MPPluginDef.cls
This post was edited on 04-15-2005 at 05:14 PM by matty.
|