You need to catch the result in a variable. Here is an example using MessageBox.Show:

Code:
        Dim result As DialogResult
        result = MessageBox.Show("Do you really want to abour the scan", "Abort", MessageBoxButtons.YesNo)
        If result = Windows.Forms.DialogResult.Yes Then

        End If