Witam :)
chciałem zrobić zegar który bd odliczał czas do tyłu :)
I napisałem coś takiego :P
private: System::Void timer1_Tick(System::Object^ sender, System::EventArgs^ e) {
label6->Text = min+":"+sec;
if(sec == 1){label6->Text = min+":0"+sec;}
if(sec == 2){label6->Text = min+":0"+sec;}
if(sec == 3){label6->Text = min+":0"+sec;}
if(sec == 4){label6->Text = min+":0"+sec;}
if(sec == 5){label6->Text = min+":0"+sec;}
if(sec == 6){label6->Text = min+":0"+sec;}
if(sec == 7){label6->Text = min+":0"+sec;}
if(sec == 8){label6->Text = min+":0"+sec;}
if(sec == 9){label6->Text = min+":0"+sec;}
if(sec == 60){label6->Text = min+":00";}
if(min == 1){label6->Text = "0"+min+":"+sec;}
if(min == 2){label6->Text = "0"+min+":"+sec;}
if(min == 3){label6->Text = "0"+min+":"+sec;}
if(min == 4){label6->Text = "0"+min+":"+sec;}
if(min == 5){label6->Text = "0"+min+":"+sec;}
if(min == 6){label6->Text = "0"+min+":"+sec;}
if(min == 7){label6->Text = "0"+min+":"+sec;}
if(min == 8){label6->Text = "0"+min+":"+sec;}
if(min == 9){label6->Text = "0"+min+":"+sec;}
sec--;
if(sec == 0)
{
sec = 60;
min--;
}
if(min == 0, sec == 0)
{
Close();
I mam problem, jest ok dopóki czas nie zejdzie poniżej 10min np. zamiast wyświetlać 09:09 to wyświetla 09:9
i jeszcze jak czas dojdzie do 00:00 to program się nie wyłącza tylko czas jest na minusie :P