VB.NET拖动无边框窗体API
发布时间:2020-12-16 22:46:28 所属栏目:大数据 来源:网络整理
导读:Declare Function SendMessage Lib "user32" Alias "SendMessageA" ( _ ByVal hwnd As IntPtr,_ ByVal wMsg As Integer,_ ByVal wParam As Integer,_ ByVal lParam As Integer) _ As Boolean Declare Function ReleaseCapture Lib "user32" Alias "ReleaseCa
Declare Function SendMessage Lib "user32" Alias "SendMessageA" ( _ ByVal hwnd As IntPtr,_ ByVal wMsg As Integer,_ ByVal wParam As Integer,_ ByVal lParam As Integer) _ As Boolean Declare Function ReleaseCapture Lib "user32" Alias "ReleaseCapture" () As Boolean Const WM_SYSCOMMAND = &H112 Const SC_MOVE = &HF010& Const HTCAPTION = 2 Private Sub Form1_MouseMove(ByVal sender As Object,ByVal e As System.Windows.Forms.MouseEventArgs) Handles Me.MouseMove ReleaseCapture() SendMessage(Me.Handle,WM_SYSCOMMAND,SC_MOVE + HTCAPTION,0) End Sub Private Sub Form1_Load(ByVal sender As System.Object,ByVal e As System.EventArgs) Handles MyBase.Load End Sub (编辑:李大同) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |