if  radiobutton2.Checked then
showmessage('女');if  not radiobutton2.Checked then
showmessage('女');这两个有什么区别?if radiobutton1.Checked then
showmessage('男')
else
if  radiobutton2.Checked then
showmessage('女');怎么写如果两个都没选择又弹出一个对话框“请选择性别”

解决方案 »

  1.   

    if (not radiobutton1.Checked) and (not  radiobutton2.Checked ) then 
    showmessage('请选择性别') 
      

  2.   

    if  (not radiobutton2.Checked and not radiobutton2.Checked )
      

  3.   

    if not RadioButton1.Checked and not RadioButton2.Checked then
        ShowMessage('please...')
      else if RadioButton1.Checked then ShowMessage('nan')
      else if RadioButton2.Checked then ShowMessage('nv');
    不过这种选择的可以用RadioGroup if RadioGroup1.ItemIndex = 0 then
       ShowMessage('nan')
     else if RadioGroup1.ItemIndex = 1 then
       ShowMessage('nv')
     else 
      

  4.   

     if radiobutton1.checked then
       ShowMessage('radioButton1');
     if radioButton2.Checked then
       ShowMessage('RadioButton2');
     if (not radioButton1.Checked and not radiobutton2.Checked) then
       showMessage('checked!!!');
      

  5.   

    6楼的油菜花啊!
    LOOKLZ:6.67%……