Exemplo n.º 1
0
 /// <include file='doc\RadioButton.uex' path='docs/doc[@for="RadioButton.OnEnter"]/*' />
 /// <internalonly/>
 /// <devdoc>
 /// </devdoc>
 protected override void OnEnter(EventArgs e)
 {
     // Just like the Win32 RadioButton, fire a click if the
     // user arrows onto the control..
     //
     if (MouseButtons == MouseButtons.None)
     {
         if (UnsafeNativeMethods.GetKeyState((int)Keys.Tab) >= 0)
         {
             //We enter the radioButton by using arrow keys
             //Paint in raised state...
             //
             ResetFlagsandPaint();
             if (!ValidationCancelled)
             {
                 OnClick(e);
             }
         }
         else
         {
             //we enter the radioButton by pressing Tab
             PerformAutoUpdates(true);
             //reset the TabStop so we can come back later
             //notice that PerformAutoUpdates will set the
             //TabStop of this button to false
             TabStop = true;
         }
     }
     base.OnEnter(e);
 }