private void icc_RequestToShareScreen(string fromIp, string keyToConnect, string invitationMessage) { Invoke(new MethodInvoker(delegate { if (MessageBox.Show("Would you like to accept this invitation : " + invitationMessage, "Invitation - Screen Sharing", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == System.Windows.Forms.DialogResult.Yes) { icc.AcceptScreenSharingSession(keyToConnect); scf = new Viewer(icc); scf.Tag = Convert.ToInt32(keyToConnect); scf.Text = "Screen"; scf.Show(); scf.timer1.Enabled = true; } else { icc.RejectScreenSharingSession(""); } })); }