public oMyForm, cEditWindow cEditWindow = "EditFile.PRG" oMyForm = createobject("myform") DEFINE WINDOW EDITPART FROM 0,0 TO 20,20 NOCLOSE NONE FLOAT GROW MDI MINIMIZE ZOOM oMyForm.visible = .t. MODIFY COMMAND (cEditWindow) WINDOW EditPart IN WINDOW EditWindow NOWAIT release window editpart activate window (cEditWindow) oMyForm.Resize() define class myform as form name = "EditWindow" top = 0 left = 0 width = 100 height = 20 scalemode = 0 procedure resize size window (wontop()) to this.height, this.width endproc procedure queryunload KEYBOARD "{ENTER}" PLAIN CLEAR * Activating the window here too ACTIVATE WINDOW (cEditWindow) ACTIVATE MENU _MSM_FILE PAD _MFI_SAVE NOWAIT endproc procedure destroy keyboard "" plain clear endproc enddefIt could stand some extra tweaking. But I believe this is what you were looking for.