Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Dim procDelegate = New user32.WinEventDelegate(Sub(hWinEventHook As IntPtr, evettype As UInteger, hwnd As IntPtr, idObject As Integer, idChild As Integer, dwEventThread As UInteger, dwmsEventTyme As UInteger)
- If idObject = 0 AndAlso idChild = 0 AndAlso hwnd = Application.MainWindow.Handle andalso mainform.Visible Then
- mainForm.UpdateLocation()
- user32.SetForegroundWindow(mainForm.Handle)
- End If
- End Sub)
- Dim hhook = user32.SetWinEventHook(user32.EVENT_OBJECT_LOCATIONCHANGE, user32.EVENT_OBJECT_LOCATIONCHANGE, Application.MainWindow.Handle, procDelegate, process.GetCurrentProcess.Id , 0, 0)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement