Ok, so... I have this code:
As you can probably tell it's used to select a window. However, I seemed to have run into a rather annoying bug:
When you use that image to select a window, the window minimizes before the icon changes and then (for some facked up reason) the MouseUp Event never happens...
I've tried fixing it with a "DoEvents", but that didn't help. I tried some other stuff aswell, but all it led to was the same problem.
Please Note: I only ever get this bug when the VB6 window isn't directly behind the application.
Frankly, it makes no sense... All help is welcomed. >_>
Code:
Private Sub imgWindow_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
imgWindow.MousePointer = 2
Me.WindowState = vbMinimized
End Sub
Private Sub imgWindow_MouseUp(Button As Integer, Shift As Integer, X As Single, Y As Single)
GetCursorPos PosXY
imgWindow.MousePointer = 0
SelWnd = WindowFromPoint(PosXY.X, PosXY.Y)
Me.WindowState = vbNormal
End Sub
As you can probably tell it's used to select a window. However, I seemed to have run into a rather annoying bug:
When you use that image to select a window, the window minimizes before the icon changes and then (for some facked up reason) the MouseUp Event never happens...
I've tried fixing it with a "DoEvents", but that didn't help. I tried some other stuff aswell, but all it led to was the same problem.
Please Note: I only ever get this bug when the VB6 window isn't directly behind the application.
Frankly, it makes no sense... All help is welcomed. >_>



