Hello,
Inside a thread I should invoke my MessageBoxEx to show it as MODAL:
If Invoke(New QuestionBoxHandler(AddressOf ShowQuestionBox), "Query?") = vbYes Then...
::
Option Strict On disallows operands of type Object for operator '='. Use the 'Is' operator to test for object identity.
If I replace = with Is:
'Is' operator does not accept operands of type 'Microsoft.VisualBasic.MsgBoxResult'. Operands must be reference or nullable types.
Private Delegate Function QuestionBoxHandler(ByVal Message As String) As DialogResult
Private Function ShowQuestionBox(ByVal Message As String) As DialogResult
ShowQuestionBox = MessageBoxEx.Show(Message, "TITLE", MessageBoxButtons.YesNo, MessageBoxIcon.Question)
End Function
Any idea how to fix this error? :(