我是vb.net(框架4)的新手,Visual Studio在以下声明中给我提出了警告。vb.net声明的问题
Private Declare Auto Function EnumChildWindows Lib "user32" (ByVal hWndParent As Long, ByVal lpEnumFunc As Long, ByVal lParam As Long) As Long
Private Declare Auto Function FindWindow Lib "user32" (ByVal lpClassName As String, ByVal lpWindowName As String) As IntPtr
Private Declare Auto Function GetWindowText Lib "user32" (ByVal hwnd As IntPtr, ByVal lpString As String, ByVal cch As IntPtr) As IntPtr
Private Declare Auto Function keybd_event Lib "user32" (ByVal bVk As Byte, ByVal bScan As Byte, ByVal dwFlags As Integer, ByVal dwExtraInfo As Integer) As Boolean
Private Declare Auto Function SendMessage Lib "user32" (ByVal hWnd As IntPtr, ByVal Msg As UInteger, ByVal wParam As IntPtr, ByVal lParam As IntPtr) As IntPtr
Private Declare Auto Function SetForegroundWindow Lib "user32" (ByVal hWnd As IntPtr) As Boolean
Private Declare Sub Sleep Lib "kernel32" (ByVal dwMilliseconds As Integer)
更重要的是我如何在未来找出正确的声明?
http://pinvoke.net/是一个很好的资源,但它通常只有C# – Rup 2010-07-05 18:13:12
当你提到一些错误或警告,请将它们添加到你的问题 – Andrey 2010-07-05 18:15:17