私はこのコードを持っています
private void picTop_MouseEnter(object sender, EventArgs e)
{
if (timer1.Tick == 10)
{
picBottom.Visible = true;
picTop.Visible = false;
timer1.Stop();
}
else
{
MessageBox.Show("ERROR You cannot view this section at this time.\nPlease try again later.");
}
}
private void picBottom_MouseEnter(object sender, EventArgs e)
{
picBottom.Visible = false;
picTop.Visible = true;
timer1.Start();
}
私のタイマー間隔は 1000 ミリ秒 (つまり 1 秒) に設定されているため、ユーザーが 10 秒後に再びトップ パネルに移動するようにしたいだけです。いくつかの助けをいただければ幸いです。
私が得る現在のエラー: timer1.Tick is red underlined, error= "The event 'System.Windows.Forms.Timer.Tick' can only appear on the left hand side of += or -="