*-- BUZZ.PRG *-- (c) 2005, squid - www.fishysquid.com *-- idea comes from Yahoo! Messenger's BUZZ *-- parameters: *-- toObject: any valid object that have .Left and .Top (.Move method) *-- tnTime : how long the toObject will be buzzed, in milliseconds lparameters toObject, tnTime local lnTime, lnEnd, lnLeftMod, lnTopMod local lnLeftOrg, lnTopOrg *-- no left / top then don't buzz if !pemstatus(toObject, "left", 5) or !pemstatus(toObject, "top", 5) then return .f. endif if vartype(tnTime) # "N" then lnTime = 250 else lnTime = tnTime endif *-- modify this to change the shock size lnLeftMod = 10 lnTopMod = 10 lnLeftOrg = toObject.Left lnTopOrg = toObject.Top lnEnd = seconds() + (lnTime / 1000) && we're talking milliseconds here do while seconds() < lnEnd toObject.Left = lnLeftOrg + (iif(rand() < 0.5, -1, 1) * int(rand() * lnLeftMod)) toObject.Top = lnTopOrg + (iif(rand() < 0.5, -1, 1) * int(rand() * lnTopMod)) enddo *-- restore old position *toObject.Left = lnLeftOrg *toObject.Top = lnTopOrg toObject.Move(lnLeftOrg, lnTopOrg) return .t. *!* cara pake: *!* save ke file, beri nama BUZZ.PRG *!* dari command window ketik code berikut: *!* Code: *!* o = newobject("form") *!* o.Show() *!* Buzz(o, 500)