Posted by webmaster Guido on February 28, 2006 In Reply to Re: RadioButton - Making a choice and continuing posted by Lionel on
February 27, 2006 Mmmm, seems I was only giving the user a few microseconds to click a radiobutton ;-) But this time :-p I actually tested the code with a small test program: procedure TForm1.Button1Click(Sender: TObject); var StartTickCount: DWORD; begin // ... while (not RadioButton1.Checked) and (not RadioButton2.Checked) do begin ShowMessage('You forgot to check your selection'); // As long as no radiobutton is checked, // repeat the message every 5000 milliseconds StartTickCount := GetTickCount; while (not RadioButton1.Checked) and (not RadioButton2.Checked) and (GetTickCount < StartTickCount + 5000) do Application.ProcessMessages; end; // if RadioButton1.Checked ... // and so on... end;
Related Articles and Replies
|