‘MSG定义
<StructLayout(LayoutKind.Sequential, Pack:=4)> _
Public Structure WINMSG
Public hwnd As IntPtr
Public message As Integer
Public wParam As IntPtr
Public lParam As IntPtr
Public time As Integer
Public x As Integer
Public y As Integer
End Structure
Public MSG As WINMSG
Dim pos As Long = GetMessagePos() '取得消息队列中上一条消息处理完毕时的鼠标指针屏幕位置
MSG.hwnd = m.HWnd
MSG.message = m.Msg
MSG.wParam = m.WParam
MSG.lParam = m.LParam
MSG.time = GetMessageTime() '取得消息队列中上一条消息处理完毕时的时间
'MessageBox.Show(pos)
MSG.x = CType(pos, Long)
'MessageBox.Show("X")
MSG.y = CType((pos >> 16), Long)
'MessageBox.Show("Y")
红色部分代码执行时程序总是退出是怎么回事
[此贴子已经被作者于2016/5/9 8:59:54编辑过]