VB Code:
  1. Private Sub cmdShow_Click()
  2. Dim answer As VbMsgBoxResult
  3.  
  4. Dim MsgBoxStyle     As VbMsgBoxStyle
  5.  
  6.     If optButton(0).Value Then
  7.         MsgBoxStyle = vbOKOnly
  8.     ElseIf optButton(1).Value Then
  9.         MsgBoxStyle = vbOKCancel
  10.     ElseIf optButton(2).Value Then
  11.         MsgBoxStyle = vbYesNo
  12.     ElseIf optButton(3).Value Then
  13.         MsgBoxStyle = vbYesNoCancel
  14.     ElseIf optButton(4).Value Then
  15.         MsgBoxStyle = vbRetryCancel
  16.     ElseIf optButton(5).Value Then
  17.         MsgBoxStyle = vbAbortRetryIgnore
  18.     End If
  19.  
  20.     If optIcon(0).Value = True Then
  21.         MsgBoxStyle = MsgBoxStyle
  22.     ElseIf optIcon(1).Value = True Then
  23.         MsgBoxStyle = MsgBoxStyle + vbCritical
  24.     ElseIf optIcon(2).Value = True Then
  25.         MsgBoxStyle = MsgBoxStyle + vbExclamation
  26.     ElseIf optIcon(3).Value = True Then
  27.         MsgBoxStyle = MsgBoxStyle + vbCritical
  28.     ElseIf optIcon(4).Value = True Then
  29.         MsgBoxStyle = MsgBoxStyle + vbInformation
  30.     ElseIf optIcon(5).Value = True Then
  31.         MsgBoxStyle = MsgBoxStyle + vbInformation
  32.     ElseIf optIcon(6).Value = True Then
  33.         MsgBoxStyle = MsgBoxStyle + vbQuestion
  34.     ElseIf optIcon(7).Value = True Then
  35.         MsgBoxStyle = MsgBoxStyle + vbCritical
  36.     ElseIf optIcon(8).Value = True Then
  37.         MsgBoxStyle = MsgBoxStyle + vbExclamation
  38.     End If
  39.  
  40.                
  41.     MsgBox txtMessage.Text, MsgBoxStyle, txtTitle.Text
  42.    
  43. txtResult.Text = answer
  44. End Sub