In the illustration below, the prompt is "Press to change to red". The title is "RED".

Modify the previous code as shown below:
Private Sub BtnHello_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) _
Handles BtnHello.Click
MsgBox("Press to change to red", MsgBoxStyle.OkOnly, "RED")
Me.BackColor = Color.Red
End Sub 'BtnHello_Click
As soon as the user presses OK, the message box disappears and the form turns red.
In the next example the user is given a choice. Since we do not know which button they will press, we will use a function so we can look at the answer.
The format for the function is:
<answer> = msgBox( <prompt>,<type>,<title>)
We will turn the form red only if the press Yes.
Notice that as you type the code most of the choices are selected from pop-up boxes.
Private Sub BtnHello_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) _
Handles BtnHello.Click
Dim Answer As MsgBoxResult
Answer = MsgBox("Do you like red?", MsgBoxStyle.YesNo, "Color")
If Answer = MsgBoxResult.Yes Then
Me.BackColor = Color.Red
End If
End Sub 'BtnHello_Click