2010-08-23 170 views

回答

0

OK,我發現我自己:

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