G
Guest
I am trying to a add a method to a helper class library I built that will
fade out the current form. My code is this:
public void fade(object currentForm)
{
int z = 0;
for(double i=1.0; i> 0; i-=.1)
{
currentForm.Opacity = i;
while(z<10000)
{
z++;
}
}
}
This works great if I go ahead and put it in my exit event on the form like
this:
int z = 0;
for(double i=1.0; i> 0; i-=.1)
{
this.Opacity = i;
while(z<10000)
{
z++;
}
}
this.Close();
When I have it in my helper Class Library it tells me that "'object' does
not contain a definition for 'Opacity'". Am I doing this wrong or is this not
allowed?
Thank you for your help!
fade out the current form. My code is this:
public void fade(object currentForm)
{
int z = 0;
for(double i=1.0; i> 0; i-=.1)
{
currentForm.Opacity = i;
while(z<10000)
{
z++;
}
}
}
This works great if I go ahead and put it in my exit event on the form like
this:
int z = 0;
for(double i=1.0; i> 0; i-=.1)
{
this.Opacity = i;
while(z<10000)
{
z++;
}
}
this.Close();
When I have it in my helper Class Library it tells me that "'object' does
not contain a definition for 'Opacity'". Am I doing this wrong or is this not
allowed?
Thank you for your help!