* Init event Procedure Init Public oFM oFM = NewObject('FormMetric', 'HTWindow') oFM.GetSysMetric(ThisForm) EndProc * MouseMove event Procedure MouseMove LParameters nButton, nShift, nXCoord, nYCoord Local ln_Width, ln_Height * Assuming VFP title, VFP sysmenu, VFP toolbar and Form title is active * We need 4 times of title height If (_Screen.WindowState = 0) ln_Width = (oFM.fbWidth * 2) + 1 ln_Height = (oFM.fbHeight * 3) + (oFM.ftHeight * 4) endif If (_Screen.WindowState = 2) ln_Width = oFM.fbWidth ln_Height = (oFM.fbHeight * 2) + (oFM.ftHeight * 4) endif Thisform.txtFormPos.Value = alltrim(str(nXCoord+ln_Width)) + ; [, ] + alltrim(str(nYCoord+ln_Height)) EndProcThat's the idea. You should actually find the real width and height for all objects, so it will work in any configuration.