SendMessage在.net中的用法
在vb6中常用的API函数SendMessage,在.NET下有问题。请看:
Private Declare Function SendMessage Lib "user32" Alias "SendMessageA" (ByVal hwnd As Integer, ByVal wMsg As Integer, ByVal wParam As Integer, ByVal lParam As Any) As Integer
Private Const WM_NCLBUTTONDOWN = &HA1
Private Const HTCAPTION = 2
------------------------------------------
问题是hwnd,在vb6中直接指定目标窗体的hwnd也就是了,比如me.hwnd,但在.net下这样写不行
我看了半天也没搞明白,请求帮忙指点一下
[解决办法]
.net 用Handle,me.Handle