Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Subclassing mmUserLoginForm on MM.NET v2.0
Message
Information générale
Forum:
ASP.NET
Catégorie:
The Mere Mortals .NET Framework
Versions des environnements
Environment:
C# 2.0
OS:
Windows XP SP2
Network:
Windows 2003 Server
Database:
MS SQL Server
Divers
Thread ID:
01091013
Message ID:
01092714
Vues:
13
Ty,

>When I subclass the mmUserLoginForm using MM.NET v2.0 and I try to view the deisgn surface, I get a error message saying:
>
>Object reference not set to an instance of an object.

Sorry it took me a while to get back to you...

This was sort of an odd one...it's due to the fact that Visual Studio "runs" some of the code in your form at design time. Oddly enough it doesn't happen with all forms, and as you can see in the error stack trace Visual Studio is trying to run the ancenstor form's mmBaseForm_Load() method. Overriding this in the subclass didn't fix it. I had to go back to mmBaseForm.mmBaseForm_Load() and change the code to the following:
protected virtual void mmBaseForm_Load(object sender, System.EventArgs e)
{
	if (OakLeaf.MM.Main.mmAppBase.IsRunning)
	{
		this.SetFocus(this.FocusOnLoadControl, true);

		if (mmAppDesktop.SecuritySetupMode)
                {
                    this.OnSecuritySetup(true);
                }
	}
}
I'll make this change in the next release, but for now you can change the MM.NET source code and recompile the Mere Mortals Framework Windows Forms project.

Best Regards,
Kevin McNeish
Eight-Time .NET MVP
VFP and iOS Author, Speaker & Trainer
Oak Leaf Enterprises, Inc.
Chief Architect, MM Framework
http://www.oakleafsd.com
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform