Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Make command window dock when starting VFP?
Message
De
31/01/2013 20:54:13
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Installation et configuration
Versions des environnements
Visual FoxPro:
VFP 9 SP2
OS:
Windows XP SP2
Network:
Windows 2003 Server
Database:
MS SQL Server
Divers
Thread ID:
01564906
Message ID:
01564913
Vues:
40
Very interesting, Sergey. Thank you for sharing this code.


>I run this code from VFP menu when I want to set IDE layout the way I like on 2 monitors
>#DEFINE SM_XVIRTUALSCREEN 76
>#DEFINE SM_YVIRTUALSCREEN 77
>#DEFINE SM_CXVIRTUALSCREEN 78
>#DEFINE SM_CYVIRTUALSCREEN 79
>#DEFINE SM_CMONITORS 80
>
>SET LIBRARY TO FoxTools.fll
>DECLARE Long GetSystemMetrics IN user32 Long nIndex
>
>ACTIVATE WINDOW View
>ACTIVATE WINDOW Properties
>ACTIVATE WINDOW Document
>ACTIVATE WINDOW Command
>
>DOCK WINDOW Command POSITION -1
>DOCK WINDOW Properties POSITION -1
>DOCK WINDOW Document POSITION -1
>DOCK WINDOW View POSITION -1
>
>= INKEY(.1)
>
>lnGap = 10
>LnFromBottom = 60
>
>lnSecondDesktopHeight = 1050
>
>LnWhCommnd = _WFindTitl("Command")
>LnWhProperties = _WFindTitl("Properties - Desktop")
>
>lnWirtualDesktopWidth = GetSystemMetrics(SM_CXVIRTUALSCREEN)
>lnMainDesktopWidth = SYSMETRIC(1)
>lnSecondDesktopWidth = lnWirtualDesktopWidth - lnMainDesktopWidth
>
>lnCommandWidth = INT((lnSecondDesktopWidth - lnGap*3)/3) * 2
>lnCommandHeight = 600
>lnCommandLeft = lnMainDesktopWidth + lnGap
>
>= _WMoveP(LnWhCommnd, lnCommandLeft, lnSecondDesktopHeight - lnCommandHeight - LnFromBottom)
>= _WSizeP(LnWhCommnd, lnCommandWidth, lnCommandHeight)
>
>
>LnPropertiesWidth = INT(lnCommandWidth * .5)
>LnPropertiesHeight = lnSecondDesktopHeight - lnGap - LnFromBottom
>LnPropertiesLeft = lnWirtualDesktopWidth - lnGap - LnPropertiesWidth
>
>= _WMoveP(LnWhProperties, LnPropertiesLeft, lnGap)
>= _WSizeP(LnWhProperties, LnPropertiesWidth, LnPropertiesHeight)
>
>= INKEY(.1)
>
>DOCK WINDOW Document POSITION 4 WINDOW Properties
>
>= INKEY(.1)
>
>DOCK WINDOW View POSITION 4 WINDOW Command
>
>= INKEY(.1)
>ACTIVATE WINDOW Properties
>ACTIVATE WINDOW Command
>
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform