Declare Integer Sleep In Kernel32 Integer Publi oform oform = Newobject("testmove") oform.Show Read Events Retu Define Class testmove As Form BorderStyle = 2 Caption = "testmove-click on any point of the form area" AlwaysOnTop = .T. BackColor = Rgb(255,255,255) Name = "testmove" ScaleMode = 3 oObj = Null Width = 900 Height = 700 Procedure MouseDown Lparameters nButton, nShift, nXCoord, nYCoord With Thisform &&draw a point (small rectangle) .ForeColor=255 .DrawWidth=12 &&pen .FillStyle=0 &&solid .PSet(nXCoord,nYCoord) &&draw Endwith This.moveobject( nXCoord, nYCoord ) Endproc Function Init lcNewObjName = 'theObject' This.Newobject( m.lcNewObjName, 'label' ) This.oObj = This.&lcNewObjName With This.oObj .Height=This.oObj.Width .BackStyle=0 .FontSize=12 .Width=130 .FontBold=.T. Endwith This.&lcNewObjName..Visible = .T. Endproc Function QueryUnload Clear Dlls Sleep Clear Events Endfunc Function KeyPress Lparameters nKeyCode, nShiftAltCtrl If Inlist( nKeyCode, 27, 113, 32 ) Clear Events Endif Endfunc Function moveobject Lparameter tnToLeft, tnToTop Rand(-1) Local lnStep, ln, lnT, lnL With This lnStep = 30 lnT = ( m.tnToTop - .oObj.Top ) / m.lnStep lnL = ( m.tnToLeft - .oObj.Left ) / m.lnStep With .oObj For ln = 1 To m.lnStep .Caption = Transform( m.ln )+" bla bla bla bla" .Top = .Top + m.lnT .Left = .Left + m.lnL * pause( 2 / m.lnStep ) Sleep(50) If .Rotation<=355 .Rotation=.Rotation+5 Else Rotation=0 Endi .ForeColor=Rgb(255*Rand(),255*Rand(),255*Rand()) Next .Rotation=0 .ForeColor=0 Thisform.Cls Endwith Endwith Endproc Enddefine *!* Function Pause( tnSeconds ) *!* *DECLARE integer Sleep in Kernel32 integer *!* Sleep( Max( 0, tnSeconds ) * 1000 ) *!* ReturnHappy christmas for all!