Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Modify Command--Eliminating 'Do you want to save changes
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00773353
Message ID:
00774003
Views:
14
This message has been marked as a message which has helped to the initial question of the thread.
>Hi Tracy:
>
>That did the trick--your sample code snippet solves my problem! I tweeked it a little to get it to work in my top-level form. There is only one undesirable effect. I can't get any scroll bars in the MODI COMM. I tried setting the ScrollBars property of the "In Window", but this has no effect.
>
>Thanks for the great tip!
>
>--Paul

Paul,

Your welcome. That was one of the things I was having a problem with too. I got this to work, however, you can resize the inner window. Not my desire. I'm still thinking about it.
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
Tracy
Previous
Reply
Map
View

Click here to load this message in the networking platform