Hi, I know it's a newbie question, in JS it's easy but apparently there're some problem here:
I added 3 events: MouseDown, MouseMove and MouseUp.
When we MouseDown 2 variables are modified: posx and controlx.
When we move the panel the Left propriete is = to Controlx+x-posx.
It work but apparently the MouseMove is run each time we move the panel so +1=+1+1+1...
The MouseMove doesn't run when POSX=-1 and I tried to set -1 each time we move the panel and after I reset this variable to X but it's the same thing...
Someone understand and could help me?
Thanks for your help!
PS: I can tell you how do this in JS, I did Windows Seven all in JS (Nearly like Win7)
I added 3 events: MouseDown, MouseMove and MouseUp.
When we MouseDown 2 variables are modified: posx and controlx.
When we move the panel the Left propriete is = to Controlx+x-posx.
It work but apparently the MouseMove is run each time we move the panel so +1=+1+1+1...
The MouseMove doesn't run when POSX=-1 and I tried to set -1 each time we move the panel and after I reset this variable to X but it's the same thing...
Someone understand and could help me?
Thanks for your help!
PS: I can tell you how do this in JS, I did Windows Seven all in JS (Nearly like Win7)