private void fuelBarTimer_Tick(object sender, EventArgs e) { jetFuelLevel--; fuelLevelBar.PerformStep(); if (jetFuelLevel == 0) { fuelBarTimer.Stop(); Vertical.Stop(); Horizontal.Stop(); MessageBox.Show("Jet ran out of fuel and crashed", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error); status = "Failed"; jetName = labelName.Text; jetHealth = 0; success = false; formResult.Show(); this.Hide(); } }