public oMyForm, cEditWindow cEditWindow = "EditFile.PRG" oMyForm = createobject("myform") oEditForm = createobject("frmEdit") *DEFINE WINDOW EDITPART FROM 1.25,0 TO 20,20 NOCLOSE NONE FLOAT GROW MDI MINIMIZE ZOOM oMyForm.visible = .t. *MODIFY COMMAND (cEditWindow) WINDOW EditPart IN WINDOW EditWindow NOWAIT MODIFY COMMAND (cEditWindow) WINDOW frmEdit IN WINDOW EditWindow NOWAIT *release window editpart activate window (cEditWindow) oMyForm.Resize() define class myform as form name = "EditWindow" scalemode = 0 top = 0 left = 0 width = 100 height = 20 FontName = _Screen.FontName FontSize = _Screen.FontSize procedure resize size window (cEditWindow) 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 enddef define class frmEdit as form name = "frmEdit" scalemode = 0 top = 0 left = 0 width = 100 height = 20 fontname = _screen.fontname fontsize = _screen.fontsize scrollbars = 3 caption = "" controlbox = .f. closable = .f. minbutton = .f. maxbutton = .f. movable = .f. borderstyle = 3 WindowState = 1 mdiform = .t. enddef