I have run into this error. Pass the the form as a generic form and then cast it as your form. I.E.
private frmMain MainForm;
public IRCEngine()
{
// something for me
_pseudoCpl = Pseudo + "|" + Age + Departement + Sexe + "0";
}
public IRCEngine(System.Windows.Forms.Form MainForm2, string svr, string port, string pseudo, string dpt, string sexe, string age, string utilisateur, string hote, string realname)
{
// Now cast the passed var to your global one.
// Might need the namespace in front of the frmMain if its not in
// the current namespace.
this.MainForm = (frmMain)MainForm2;
}
Hope that helps