例37:爱好选择

  1. 建立一个新的EXE工程,放两个单选,两个复选框如图33。

例37:爱好选择_第1张图片                   图33

  1. 输入代码:
Sub Form1_Check1_BN_Clicked(hWndForm As hWnd, hWndControl As hWnd)

   Text1.Text = ""

   If Check1.Value Then

         Text1.Text="你喜欢"  & Check1.Caption

   End If

   If Check2.Value Then

      Text1.Text= Text1.Text & "你喜欢" & Check2.Caption

   End If

End Sub



Sub Form1_Check2_BN_Clicked(hWndForm As hWnd, hWndControl As hWnd)

   Text1.Text = ""

    If Check2.Value Then

         Text1.Text="你喜欢"  & Check2.Caption

   End If

   If Check1.Value Then

      Text1.Text=Text1.Text & "你喜欢" & Check1.Caption

   End If



End Sub



Sub Form1_genda1_BN_Clicked(hWndForm As hWnd, hWndControl As hWnd)

   If genda1.Value Then

      Text1.Text="你的性别为" & genda1.Caption

   End If

End Sub

Sub Form1_genda2_BN_Clicked(hWndForm As hWnd, hWndControl As hWnd)

      If genda2.Value Then

      Text1.Text="你的性别为" & genda2.Caption

   End If

End Sub

你可能感兴趣的:(Visual,Free,Basic例解教程,java,服务器,前端)