If form is moving then

I need to alternate the value of a boolean var.. if form is moving then MyVariable to False and if form is not moving then MyVariable to True.

I've tried this but I can click in the border of my app to move the app and then this code will not work as expected 'cause only affect if I click in the clientarea:

Private Sub Form1_MouseDown(sender As Object, e As MouseEventArgs) Handles MyBase.MouseDown
    Timer_Flag = False
End Sub
Private Sub Form1_MouseUp(sender As Object, e As MouseEventArgs) Handles MyBase.MouseUp
    Timer_Flag = True
End Sub

Also I've tried with move event and locationchanged... but I don't know how to detect if form is moving or not.


I believe this post WinForms window drag event answered the question. Thanks Elektro Hacker, keep up the good work.

Need Your Help

npm: create script command

javascript node.js npm

When I run my NodeJs (ES6) project I type in the console the following:

Read webm video from blob on firefox

html5 firefox video blob webrtc

I'm testing WebRTC API. More precisely the webcam part.