Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Using mmMessageBox
Message
De
19/04/2005 11:01:07
 
 
À
Tous
Information générale
Forum:
ASP.NET
Catégorie:
The Mere Mortals .NET Framework
Titre:
Using mmMessageBox
Divers
Thread ID:
01006205
Message ID:
01006205
Vues:
68
Hello All:

We're trying to subclass mmMessageBox so that we can change the color to match our color scheme. We have created zzMessageBox, zzMessageBoxForm, zzAppDesktop and zzFactoryDesktop.
In zzAppDesktop, we have created the following method:
public override mmMessageBox MessageBox
{
get
{
// Instantiate the MessageBox object if it's null
if (_messagebox == null)
{
zzFactoryDesktop WinFactory = (zzFactoryDesktop)Factory; //error here
_messagebox = WinFactory.CreateMessageBox();
}
return _messagebox;
}
set { _messagebox = value; }
}
private static zzMessageBox _messagebox;

This method calls our zzFactoryDesktop, which has the follwing method:
public new zzMessageBox CreateMessageBox()
{
return new zzMessageBox();
}


However, this does not work. We are getting an error on the line I have noted, saying the specified cast is not valid. First off, can mmMessageBox be subclassed to change properties such as color, font, etc...? Second, are we going about this the correct way? If we are not doing it properly, how should this be done?

Thanks for any advice!
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform