What happened to the Messenger Plus! forums on msghelp.net?
Shoutbox » MsgHelp Archive » Messenger Plus! for Live Messenger » Scripting » Plug-Ins » [C#] EventLog and Threads

1 votes - 5 average   [C#] EventLog and Threads
Author: Message:
Jedimark
Full Member
***


Posts: 140
Reputation: 6
Joined: Apr 2002
O.P. RE: [C#] EventLog and Threads
The Solution:

Delegates!

I.e:
code:
private delegate void addEventLogDelegate(String thisContact, String thisTitle, String thisArtist);

And then in the other thread (one that isnt the main):
code:
addEventLogDelegate d = new addEventLogDelegate(this.addEventLog);
                        Object[] oArgs = new Object[3];
                        oArgs[0] = myUBX.getContact();
                        oArgs[1] = myUBX.getSong();
                        oArgs[2] = myUBX.getArtist();
                        this.Invoke(d, oArgs);
10-22-2005 10:07 AM
Profile PM Find Quote Report
« Next Oldest Return to Top Next Newest »

Messages In This Thread
[C#] EventLog and Threads - by Jedimark on 10-21-2005 at 05:01 PM
RE: [C#] EventLog and Threads - by J-Thread on 10-21-2005 at 06:58 PM
RE: [C#] EventLog and Threads - by Jedimark on 10-21-2005 at 07:02 PM
RE: [C#] EventLog and Threads - by J-Thread on 10-21-2005 at 07:08 PM
RE: [C#] EventLog and Threads - by Jedimark on 10-21-2005 at 07:47 PM
RE: [C#] EventLog and Threads - by Jedimark on 10-22-2005 at 10:07 AM


Threaded Mode | Linear Mode
View a Printable Version
Send this Thread to a Friend
Subscribe | Add to Favorites
Rate This Thread:

Forum Jump:

Forum Rules:
You cannot post new threads
You cannot post replies
You cannot post attachments
You can edit your posts
HTML is Off
myCode is On
Smilies are On
[img] Code is On