Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Using mmMessageBox
Message
From
19/04/2005 11:01:07
 
 
To
All
General information
Forum:
ASP.NET
Category:
The Mere Mortals .NET Framework
Title:
Using mmMessageBox
Miscellaneous
Thread ID:
01006205
Message ID:
01006205
Views:
67
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!
Next
Reply
Map
View

Click here to load this message in the networking platform