Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Cascading windows(forms)
Message
De
23/02/2000 19:01:12
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Divers
Thread ID:
00336066
Message ID:
00336433
Vues:
18
Here's some code for the cascading - you will need to modify it:
LPARAMETERS tcFormName, tlNoAutoCenter, tnTop, tnLeft, tnCol
LOCAL loFrame, lnCascade, lnTop, lnLeft, lnCol, lnFrameHeight, lnTitleHeight, llAllForms, i

ASSERT EMPTY(tcFormName) OR (VARTYPE(tcFormName) = "C" AND WEXIST(tcFormName))

loFrame       = This.aForms[1, 1]
lnTop         = IIF(VARTYPE(tnTop) = "N", tnTop, 0)
lnLeft        = IIF(VARTYPE(tnLeft)= "N", tnLeft, 0)
lnCol         = IIF(VARTYPE(tnCol) = "N" AND tnCol > 0, tnCol, 1)
lnFrameHeight = loFrame.Height
lnTitleHeight = SYSMETRIC(9)
llAllForms    = EMPTY(tcFormName)
lnCascade     = 0
   
FOR i = ALEN(This.aForms, 1) TO 2 STEP -1
    WITH This.aForms[i, 1]
         IF (llAllForms OR ALLTRIM(UPPER(.Name)) == ALLTRIM(UPPER(tcFormName))) AND ;
            .WindowState = 0 AND .Visible AND NOT (tlNoAutoCenter AND .AutoCenter)
       
            .Top  = lnTop
            .Left = (lnLeft * lnCol)
            .AutoCenter = .F.
            lnCascade = lnCascade + 1

            IF lnTop > lnFrameHeight - lnTitleHeight
               STORE lnTitleHeight TO lnTop, lnLeft
               lnCol = lnCol + 1
            ENDIF

            lnTop  = lnTop + lnTitleHeight
            lnLeft = lnLeft + lnTitleHeight       
         ENDIF
    ENDWITH
ENDFOR   

RETURN lnCascade   
>I need to have my app do the following
>
>Everytime the user opens a window(form) to have that form be cascaded
>
>I need also to add the window to the window menu and remove it when the window is closed
>
>Does anyone have examples, ideas,........
>
>Thanks
>
>Manny
- Jeff
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform