i have
private void tvMSNContacts_DoubleClick(object sender, TreeViewEventArgs e)
{
Multim_MSN_ msnSession = new Multim_MSN_();
msnSession.SetSessionTitle(e.Node.Text + " Message Session");
msnSession.Show();
}
and the compiler says:
Error 5 No overload for 'tvMSNContacts_DoubleClick' matches delegate 'System.EventHandler' C:\Documents and Settings\David\Desktop\C#\Multim Messenger\Multim Messenger\Form1.Designer.cs 453
its set up to take the two default arguements:
object sender, EventArgs e
i want it to take:
object sender, TreeViewEventArgs e
also, if anyone knows my bigger problem, i have my mainform for my IM set up, when i click my contacts name, a window comes up so i can type and recieve messages, i have functions for my session window class to set the title based on the contacts name, i can send the incoming messages to the session windows textbox that holds the 2way conversation's messages, but i cant send messages because i do not know how to make my SessionWin class gain access to the myMSNMessenger class instance (this class holds all the data for connecting, disconnecting, sending, recieving messages, loading contacts and putting them into groups, and so on...) in my main form. i need to access this object so when i click the session windows send button i have acess to the SendMessage function, i cant make a separate myMSNMessenger object in my SessionWin class because that object logs me in and i cant log in twice. is it possible to pass a function as a param? can i pass the SendMessageFunction as a param to my btnSendMessage_OnClick event method? i hope i make sense, this is kind of hard for me to explain.
|