#region 程序花屏 启动强制重绘
private string state = "0";//启动重绘 1:启动 0:未启动
/// <summary>
/// 最小化窗口
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
private void logoPictureBox_Click(object sender, EventArgs e)
{
this.WindowState = FormWindowState.Minimized;//最小化窗体
state = "1";//启动重绘 1:启动 0:未启动
}
private void timer2_Tick(object sender, EventArgs e)
{
this.Refresh();
timer2.Stop();
state = "0";//启动重绘 1:启动 0:未启动
}
private void FormMain_Resize(object sender, EventArgs e)
{
//窗体恢复正常时
if (this.WindowState == FormWindowState.Maximized&& state=="1")
{
timer2.Start();//启动重绘 时间控件
}
}
#endregion