
May 27th, 2004, 10:34 AM
|
|
Registered User
|
|
Join Date: May 2004
Posts: 1
Time spent in forums: < 1 sec
Reputation Power: 0
|
|
|
Drag window
Okay so I am making my custom UI.
but I am stuck on the part where people can drag the window, since it's a Borderless form.
I have right now an onMousedown even that checks if the Y of the mouse is smaller than 20, if it is, we set drag to true, and we get the or_x and or_y (origin) by substracting the window's Left to the X of the mosue and the window's Top to the mouse's Y.
Then i have an onMouseMove event that checks if drag is true, and if it is, then
Form1.Top:=Y+or_y;
Form1.Left:=X+or_x;
Now this kind of works, but the window flickers like crazy! Got a clue what i should do?
|