SoFunction
Updated on 2025-03-01

Summary of the methods of implementing form fading effect in C#


#region    *********   Form Fade In Effect Function     *********
private   double   WinShow   =   0;//Variables used for window fading effect

  private   void   FormShow(   Curfrm)  
  {  
     =   WinShow   ;  
  WinShow   +=   0.01;  
  if(WinShow   ==   1)  
  {  
     ();  
  }  
  }  

  #endregion  

#region    *********   Example of form fading effect function call *********
//Implement the fading effect of the window
  private   void   timerShow_Tick(object   sender,      e)  
  {  
//timerShow, this is the name of a timer control; just turn = 100.
  FormShow(this);  
  }  
  #endregion