Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Where to put form validation code?
Message
De
21/04/2004 07:51:42
Gerry Schmitz
GHS Automation Inc.
Calgary, Alberta, Canada
 
 
À
21/04/2004 05:22:40
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Divers
Thread ID:
00896491
Message ID:
00896811
Vues:
12
>It is obvious that if I use 1000 variable ones of state in order to chase all the possible sequences of the events, considering the RETURN F. that they block to the When/Valid and the NODEFAULT that block the LostFocus, < b>perhaps it is possible to block all the undesired operations that VFP executes.

It's a little simpler than that.

>David,
>with two forms with the current form into semimodal,
>i can found a event sequence that it succeeds to violate the test code that you insert
>


OK, you're on ....
o1 = createobject("form1")
o2 = createobject("form1")
o3 = createobject("form1")
o4 = createobject("form1")

o1.show
o2.show
o3.show
o4.show

= sys(1500,"_MWI_CASCADE","_MWINDOW")

on key label esc clear events
read events
on key label esc

DEFINE CLASS form1 AS form
   Height = 100
   Width = 300
   lsemimodal = .F. && -- lSemiModal - this form is running in semi-modal mode

   ADD OBJECT command1 AS commandbutton WITH ;
      autosize = .t., ;
      Top = 20, ;
      Left = 23

   ADD OBJECT check1 AS checkbox WITH ;
      Top = 25, ;
      Left = 151, ;
      AutoSize = .T., ;
      Caption = "Semi-modal", ;
      ControlSource = "thisform.lSemiModal"

   proc check1.click
      set skip of menu _msysmenu this.value

      for each m.lo_form in _screen.forms
         if thisform.name <> m.lo_form.name
            m.lo_form.enabled = !m.lo_form.enabled
         endif
      next

   PROCEDURE Load
      this.Name = sys(2015)
      this.Caption = this.Name
ENDDEFINE
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform