declare integer GetActiveWindow in win32API declare short GetClientRect in win32API integer HWND, string @ lpRect declare short MoveWindow in win32API ; integer hWnd, integer X, integer Y, ; integer nWidth, integer nHeight, short bRepaint #define BIF_BROWSEFORCOMPUTER 0x1000 #define BIF_BROWSEFORPRINTER 0x2000 #define BIF_BROWSEINCLUDEFILES 0x4000 oShell = createobject("Shell.Application") * Get directory oTmr = CreateObject('myTimer',400,300) oFolder = oShell.BrowseForFolder(0, "Please Select folder", 0 ) oTmr = .null. release oTmr define class myTimer as Timer Interval=10 nLeft=0 nTop=0 procedure init lparameters tnLeft,tnTop this.nLeft=tnLeft this.nTop=tnTop endproc procedure timer local HWND, lnLeft, lnRight, lnTop, lnBottom if this.Tag='DONE' this.Enabled=.f. return endif HWND = GetActiveWindow() lpRect=space(4*4) GetClientRect(HWND,@lpRect) lnLeft=this.Str2Int(substr(lpRect,1,4)) lnTop=this.Str2Int(substr(lpRect,5,4)) lnRight=this.Str2Int(substr(lpRect,9,4)) lnBottom=this.Str2Int(substr(lpRect,13,4)) MoveWindow(HWND,this.nLeft,this.nTop,; lnRight-lnLeft,lnBottom-lnTop+sysmetric(9),1) this.Tag='DONE' endproc procedure Str2Int lparameters tcStr local ix,lnRet lnRet = 0 for ix=1 to 4 lnRet = lnRet + asc(substr(tcStr,ix))*256^(ix-1) endfor return lnRet endproc enddefineBeware top,left position are screen coordinates not client area. You can find conversion functions for that in a message I posted earlier. The specific keyword to search I remember is GetCaretPos.