This commit is contained in:
Jonathan Jenne
2019-09-13 16:05:20 +02:00
parent 6b955569f6
commit 8a8b286c77
19 changed files with 621 additions and 527 deletions

View File

@@ -51,6 +51,9 @@ Class Win32
Public Const AC_SRC_OVER As Byte = &H0
Public Const AC_SRC_ALPHA As Byte = &H1
Public Const WM_NCLBUTTONDOWN As Integer = &HA1
Public Const HTCAPTION As Integer = &H2
<DllImport("user32.dll", ExactSpelling:=True, SetLastError:=True)>
Public Shared Function UpdateLayeredWindow(ByVal hwnd As IntPtr, ByVal hdcDst As IntPtr, ByRef pptDst As Point, ByRef psize As Size, ByVal hdcSrc As IntPtr, ByRef pprSrc As Point, ByVal crKey As Int32, ByRef pblend As BLENDFUNCTION, ByVal dwFlags As Int32) As Bool
End Function
@@ -72,6 +75,13 @@ Class Win32
<DllImport("gdi32.dll", ExactSpelling:=True, SetLastError:=True)>
Public Shared Function DeleteObject(ByVal hObject As IntPtr) As Bool
End Function
<DllImport("User32.dll")>
Public Shared Function ReleaseCapture() As Boolean
End Function
<DllImport("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
End Class
Public Class ClassFlowForm
@@ -81,6 +91,23 @@ Public Class ClassFlowForm
TopMost = True
End Sub
Private Sub Form_Load(ByVal sender As Object, ByVal e As EventArgs)
AddHandler MouseDown, New MouseEventHandler(AddressOf Form_MouseDown)
End Sub
Private Sub Form_MouseDown(ByVal sender As Object, ByVal e As MouseEventArgs) Handles MyBase.MouseDown
If e.Button = MouseButtons.Left Then
Win32.ReleaseCapture()
Win32.SendMessage(Handle, Win32.WM_NCLBUTTONDOWN, Win32.HTCAPTION, 0)
End If
End Sub
Private Sub Form_click(ByVal sender As Object, ByVal e As EventArgs) Handles MyBase.Click
MsgBox("LOL")
End Sub
Public Sub SetBitmap(ByVal bitmap As Bitmap)
SetBitmap(bitmap, 255, bitmap.Width, bitmap.Height)
End Sub