Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Modify Command--Eliminating 'Do you want to save changes
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00773353
Message ID:
00773827
Vues:
26
This message has been marked as a message which has helped to the initial question of the thread.
>Hi all:
>
>I have an application that requires a user to edit a PRG file in the runtime environment while getting the syntax coloring. Currently, I'm using the MODI COMM command to do this.
>
>My problem is that my users don't want the prompt, "Do you want to save your changes?" to come up. Is there some way I can turn this off?
>
>Thanks!
>
>--Paul

Paul,

I sat here and thought about this for a while. I liked the idea and wanted to see if I could figure out a way to do it with the X of the window. Try working with this.
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
enddef
It could stand some extra tweaking. But I believe this is what you were looking for.
Tracy
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform