vb.net drag window without titlebar
Public Const WM_NCLBUTTONDOWN As Integer = &HA1
Public Const HT_CAPTION As Integer = &H2
<DllImportAttribute("user32.dll")> _
Public Shared Function SendMessage(ByVal hWnd As IntPtr, ByVal Msg As Integer, ByVal wParam As Integer, ByVal lParam As Integer) As Integer
End Function
<DllImportAttribute("user32.dll")> _
Public Shared Function ReleaseCapture() As Boolean
End Function
Private Sub Form1_MouseDown(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles Me.MouseDown, Panel1.MouseDown
If e.Button = Windows.Forms.MouseButtons.Left Then
ReleaseCapture()
SendMessage(Handle, WM_NCLBUTTONDOWN, HT_CAPTION, 0)
End If
End Sub
Also in C#:
- how to disable device guard or credential guard vmware
- unity get max occurrence in list
- Add component object to gameobject unity
- how to switch scenes in unity
- Assets\playermove.cs(30,37): error CS1003: Syntax error, ',' expected
- c# System.Resources.MissingManifestResourceException error
- automapper c# initialize error
- how to draw a dot in c#
- unity switch to scene and transfer data
- unity clamp rotation
- unity add component
- asp.net mvc return file
- decalre an int list mvc
- or in C#
- set width of rect transform unity
- c# use hashtable check if key exists
- c# regex replace
- unity transformer double en float
- unity raycast 2d
- unity generate random color
- c# input integer
- month number to text in c#
- iframe set html content c#
- unity instantiate vector3