ОК, я выяснил сам:
Public Class Form1
Private Const WM_COMMAND As Integer = &H111
Protected Overrides Sub WndProc(ByRef m As System.Windows.Forms.Message)
'Show the Message "OK" if someone sends a message with WParam 2:
If (m.Msg = WM_COMMAND AndAlso m.WParam = CType(2, IntPtr)) Then
MsgBox("OK")
End If
MyBase.WndProc(m)
End Sub
End Class