level 1
TuskAi
楼主
本人新手,在网上找了一段VB的代码,想改成VB.NET
涉及到回调,一直改不正确
原语句
EnumChildWindows twnd, AddressOf EnumChildProc, ByVal 0&
Declare Function EnumChildWindows Lib "user32" (ByVal hWndParent As Long, ByVal lpEnumFunc As Long, ByVal lParam As Long) As Long
Public Function EnumChildProc(ByVal hwnd As Long, ByVal lParam As Long) As Long
我改成了
EnumChildWindows(twnd, AddressOf EnumChildWindowsCallBack, 0&)
Declare Function EnumChildWindows Lib "user32" (ByVal hWndParent As Integer, lpEnumFunc As EnumChildWindowsCallBack, ByVal lParam As Integer) As Integer
Public Function EnumChildWindowsCallBack(ByVal hwnd As Integer, ByVal lParam As Integer) As Integer
系统提示
错误1未定义类型“EnumChildWindowsCallBack”。
2016年02月27日 12点02分
1
涉及到回调,一直改不正确
原语句
EnumChildWindows twnd, AddressOf EnumChildProc, ByVal 0&
Declare Function EnumChildWindows Lib "user32" (ByVal hWndParent As Long, ByVal lpEnumFunc As Long, ByVal lParam As Long) As Long
Public Function EnumChildProc(ByVal hwnd As Long, ByVal lParam As Long) As Long
我改成了
EnumChildWindows(twnd, AddressOf EnumChildWindowsCallBack, 0&)
Declare Function EnumChildWindows Lib "user32" (ByVal hWndParent As Integer, lpEnumFunc As EnumChildWindowsCallBack, ByVal lParam As Integer) As Integer
Public Function EnumChildWindowsCallBack(ByVal hwnd As Integer, ByVal lParam As Integer) As Integer
系统提示
错误1未定义类型“EnumChildWindowsCallBack”。