winform 渐变(非API)
public FrmMain() { InitializeComponent(); //窗体显示特效 Opacity = 0.0; //窗体透明度为0 fadeTimer.Start(); //计时开始 } private void fadeTimer_Tick(object sender, EventArgs e) { const double d = 0.10; if (Opacity + d >= 1.0) { Opacity = 1.0; fadeTimer.Stop(); } else { Opacity += d; } }