I read the code from my teacher to make a radiobutton in VS++2010
this->rbSenior->AutoSize = true;
this->rbSenior->Location = System::Drawing::Point(56, 161);
this->rbSenior->Name = L"rbSenior";
this->rbSenior->Size = System::Drawing::Size(55, 17);
this->rbSenior->TabIndex = 9;
this->rbSenior->TabStop = true;
this->rbSenior->Text = L"Senior";
this->rbSenior->UseVisualStyleBackColor = true;
and
if (rbFreshman->Checked) answer = 0;
I understand the code, because it is simple. However, how I know whether ‘CHECKED’ is an available property in radio button.
You have many options:
1) Read the documentation. Microsof doc are freely available online at msdn.microsoft.com. From there a search for “radio button” yield this. Alternatively pressing F1 should bring the help if you have installed it.
2) Switch to the “design” view of your form (shift + F7), click on the radio button. There should be a “property” window or toolbox listing the design properties.
3) Use intellisense. Type
this->rbSenior->then press “ctrl + space”. It should list the properties and methods available on any object (doesn’t work on most complex cases, but you are not there yet)