日期:2014-05-17 浏览次数:20873 次
Public Class Form1
Declare Function SendMessageW Lib "user32" (ByVal hwnd As Integer, ByVal uMsg As Integer, ByVal wParam As Integer, ByVal lParam As Integer) As Integer
Declare Function SetWindowLongW Lib "user32" (ByVal hWnd As Integer, ByVal ndx As Integer, ByVal newValue As callbacktype) As Integer
Declare Function SetWindowLongW Lib "user32" (ByVal hWnd As Integer, ByVal ndx As Integer, ByVal newValue As Integer) As Integer
Private Declare Function CallWindowProcW Lib "user32" (ByVal lpPrevWndFunc As Integer, ByVal hWnd As Integer, ByVal Msg As Integer, ByVal wParam As Integer, ByVal lParam As Integer) As Integer
Const GWL_WNDPROC As Integer = -4
Const WM_LBUTTONDOWN As Integer = &H201
Private oldProcAddr As Integer
Delegate Function callbacktype(ByVal hWnd As Integer, ByVal uMsg As Integer, ByVal wParam As Integer, ByVal lParam As Integer) As Integer
Private Sub Form1_FormClosed(sender As Object, e As FormClosedEventArgs) Handles Me.FormClosed
SetWindowLongW(Panel1.Handle, GWL_WNDPROC, oldProcAddr)
End Sub
Private Sub Form1_Load(sender As Object, e As EventArgs) Handles MyBase.Load<