PDA

Click to See Complete Forum and Search --> : Forrm Start up Pos. (asap)


Stick
Jan 24th, 2000, 12:45 PM
Hello
I was wondering how to get my form back to the start up postion after a user moves it!
I Still want the user to beable to move it but i want to be able to move it to the start up postion.

------------------
_-_-_-_-_-_-_-_-_-_-_-_-_
Thanks
Sean Stickrod
ICQ:9639200 (http://wwp.icq.com/scripts/search.dll?to=9639200)

DiGiTaIErRoR
Jan 24th, 2000, 01:11 PM
put this in a timer:
make the interval about 500

Static FormX, FormY, OldX, OldY, orgX, orgY
If orgX = "" Then
orgX = Form1.Left
orgY = Form1.Top
End If
If OldX = "" Then
OldX = Form1.Left
Else
OldX = FormX
End If
If OldY = "" Then
OldY = Form1.Top
Else
OldY = FormY
End If
FormX = Form1.Left
FormY = Form1.Top
If OldX <> FormX Then Form1.Left = orgX
If OldY <> FormY Then Form1.Top = orgY

This works but how fast it responds depends on the timer interval.

------------------
DiGiTaIErRoR