Shoutbox

Change Displaypicture - Printable Version

-Shoutbox (https://shoutbox.menthix.net)
+-- Forum: MsgHelp Archive (/forumdisplay.php?fid=58)
+--- Forum: Messenger Plus! for Live Messenger (/forumdisplay.php?fid=4)
+---- Forum: Scripting (/forumdisplay.php?fid=39)
+----- Forum: Plug-Ins (/forumdisplay.php?fid=28)
+------ Thread: Change Displaypicture (/showthread.php?tid=52484)

Change Displaypicture by Tobiaz on 11-01-2005 at 12:02 PM

Hi...
How can I change the DisplayPicture? I didn't find an API for something like this.
And how often can I change it per Minute / Hour?

Greeeeeez & Thank you very much!


RE: Change Displaypicture by kittymew on 11-01-2005 at 10:53 PM

You don't need a plugin.:)

Go To "tools" top of MSN messenger Window

Then to "change Display Picture"

then on your left you will get a list of pictures that you can use
OR
if you don't like them use"browse"on your right

and browse pictures that you may have saved on your computer
click on the picture you want and it will change in your"display picture"..

and you can change them as often as you like..and as quick as you wish..there is no time limit at all!


RE: Change Displaypicture by matty on 11-02-2005 at 04:47 AM

To do so with a Messenger Plus! Plugin you need to do the following

Note this is in Visual Basic

code:
Private objMessengerAPI As Object
Private Const
M_ContactProperty_DP As Long = 2

Option Explicit

Public Function
Initialize(ByVal nVersion As Long, _
                           ByVal sUserEmail As String, _
                           ByVal oMessenger As Object) _
                           As Boolean
    Initialize = True
    Set
objMessengerAPI = oMessenger

    objMessengerAPI.MyProperty(M_ContactProperty_DP) = "<filename>"
End Function

RE: RE: Change Displaypicture by J-Thread on 11-02-2005 at 07:09 AM

quote:
Originally posted by beamy-kitty
You don't need a plugin.:)
He is making a plugin and wants to know how to change the picture within the code;)

You will need the Messenger API for this to work. Set is as a reference in your project, and try matty's code(Y)
RE: Change Displaypicture by Tobiaz on 11-02-2005 at 12:38 PM

Yes that's right J-Thread... I want to do a new Plugin :P So, thank you Matty for the Source...! greeeeeez (sorry, i can't use my <return> key anymore... that why it's all on one line ;))


RE: Change Displaypicture by matty on 11-02-2005 at 01:06 PM

quote:
Originally posted by J-Thread
You will need the Messenger API for this to work. Set is as a reference in your project
Unless you are using the events like MyStatusChange you don't need to set a reference to the Messenger API.

quote:
Originally posted by Tobiaz
Yes that's right J-Thread... I want to do a new Plugin :P So, thank you Matty for the Source...! greeeeeez (sorry, i can't use my <return> key anymore... that why it's all on one line ;))
If you are on a desktop computer and your keyboard has a number pad. There is an enter key on the right hand side.
Other option is click Start > Run > type osk and click OK.
RE: Change Displaypicture by Tobiaz on 11-02-2005 at 01:24 PM

Wow... thank you for this cool hint!
But... not my Keyboard is demaged, it's more Windows...
Sometimes i can use it, and sometimes not...

Thank you again! ;)

EDIT: If I'd like to change my Pic in the Initialize Function the Source works... but how can I change it with a button on a form!? How can I call this Initialize function!?


Excuse this double post! I'm really sorry to do this, but no one saw my "EDIT" in the Post before...

I've got a big (but I think it's small) Problem!
Now... if I have this Code in the Initialize Function, it runs. But how can I do it with a button on a Form? How can I call the Initialize function...

I'm sure it's really simple, and I'm only to stupid. I tried to make it running the last 2 Days! :S

Thank you and sorry again for the double post!

Greeeeez
RE: Change Displaypicture by matty on 11-04-2005 at 05:27 PM

Create a function in itself.

code:
Public Function ChangeDisplayPicture(ByVal sPath As String) As Boolean
On Error GoTo
mError
    objMessengerAPI.MyProperty(M_ContactProperty_DP) = sPath
    ChangeDisplayPicture = True
    Exit Function

mError:
    ChangeDisplayPicture = False
End Function



Then you can call it like ChangeDisplayPicture "<path>"
RE: Change Displaypicture by Tobiaz on 11-04-2005 at 05:43 PM

Woooooow! Thanks a lot!
I tried to do it while 2 days, and you can post it in 30s!

:D THANKS again...


RE: RE: Change Displaypicture by J-Thread on 11-04-2005 at 05:44 PM

Just a note, but your initialize function should then be:

code:
Private objMessengerAPI As Object
Private Const
M_ContactProperty_DP As Long = 2

Option Explicit

Public Function
Initialize(ByVal nVersion As Long, _
                           ByVal sUserEmail As String, _
                           ByVal oMessenger As Object) _
                           As Boolean
    Initialize = True
    Set
objMessengerAPI = oMessenger
End Function


RE: Change Displaypicture by Tobiaz on 11-05-2005 at 09:30 AM

Hi... i'm sorry. It's me again :S
Now I made it like you have posted. I updated the "Initialize" Function and used the "ChangeDisplayPicture" Function. So. Thank you again. But... Everytime i call the ChangeDisplayPicture Function, the Error Number 91 appears. (Sorry, I don't know the Errordescreption in English :S)

I'm loading the Path from a Reg-Setting. But I don't think, this is the Error...

Can you help me again?

Thank you


RE: Change Displaypicture by matty on 11-05-2005 at 03:19 PM

quote:
Originally posted by Tobiaz
Hi... i'm sorry. It's me again :S
Now I made it like you have posted. I updated the "Initialize" Function and used the "ChangeDisplayPicture" Function. So. Thank you again. But... Everytime i call the ChangeDisplayPicture Function, the Error Number 91 appears. (Sorry, I don't know the Errordescreption in English :S)

I'm loading the Path from a Reg-Setting. But I don't think, this is the Error...

Can you help me again?

Thank you
Did you make sure your Initialize Function looks like this:

quote:
Originally posted by J-Thread
Just a note, but your initialize function should then be:
code:
Private objMessengerAPI As Object
Private Const
M_ContactProperty_DP As Long = 2

Option Explicit

Public Function
Initialize(ByVal nVersion As Long, _
                           ByVal sUserEmail As String, _
                           ByVal oMessenger As Object) _
                           As Boolean
    Initialize = True
    Set
objMessengerAPI = oMessenger
End Function


RE: Change Displaypicture by Tobiaz on 11-05-2005 at 04:43 PM

Yes... it looks exactly like this. But the Error nr. 91 appears everytime i use the changeDisplayPicture function...


RE: Change Displaypicture by J-Thread on 11-05-2005 at 10:39 PM

But WHAT is the error 91? We don't know all the error numbers by heart...

I doesn't matter if it is in another language (german?), there may be somebody else who can translate it...


RE: Change Displaypicture by matty on 11-05-2005 at 10:56 PM

Oh it is Object or With variable not set.

Try changing

code:
Private objMessengerAPI As Object
Private Const
M_ContactProperty_DP As Long = 2

To:
code:
Public objMessengerAPI As Object
Public Const
M_ContactProperty_DP As Long = 2

RE: Change Displaypicture by Tobiaz on 11-06-2005 at 08:34 AM

Hm... With "Public" it doesn't work too... :(

Is there a way to call the "Initialize" function? When I have the Source in the "Initialize" function it works...
Maybe I can uninitialize my plugin and then when I initialize it again, the function will be call... !? (Maybe :D:P;))

Greeeeez


RE: Change Displaypicture by matty on 11-06-2005 at 09:17 AM

You want to post the source code you have (or put it on a web server and PM me the link) and I will take a look at it.