I've got a Windows Forms Application project where I'm using 2 radial buttons.
I want to poll whether the radial button has been pressed or not. Here's one
way I think it could work, using the Checked property :
bool r1=System::Windows::Forms::RadioButton::get_Checked;
but how do I specify that I'm looking for the Checked property of
radiobutton1 ??
I intend to use r1 as a variable defined in the function created by the
click event handler of radial buttons 1 & 2. Can I define r1 outside this
function ?
Thanks for the help,
AK
> bool r1=System::Windows::Forms::RadioButton::get_Checked;
>
> but how do I specify that I'm looking for the Checked property of
> radiobutton1 ??
You use:
bool r1 = radiobutton1->Checked;
Can I assume that radiobutton1 is a class member variable? Was it defined by
the form designer?
> I intend to use r1 as a variable defined in the function created by
> the
> click event handler of radial buttons 1 & 2. Can I define r1 outside
> this function ?
Sure, make it a class member variable. But then again, radiobutton1->Checked
is accessible anywhere within the class, so why bother?

Signature
Tim Robinson
MVP, Windows SDK