Visual Studio
A family of Microsoft suites of integrated development tools for building applications for Windows, the web and mobile devices.
4,888 questions
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
Friends, I have a doubt, although I have tried many times and got no result. I have a grouBox with 10 radiobutton. When I load the program, radiobutton 1 is always selected. I need no radiobutton to be selected. I tried with the following code but it didn't work. Where would the problem be? I put this code in frmload.
for each (Control ^ ctl in groupBox1->Controls)
{
RadioButton^ rb = dynamic_cast<RadioButton^>(ctl);
if (rb->Checked)
rb->Checked = false;
}
Like in another thread, it works for me in Form1_Shown