Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Make command window dock when starting VFP?
Message
General information
Forum:
Visual FoxPro
Category:
Installation, Setup and Configuration
Environment versions
Visual FoxPro:
VFP 9 SP2
OS:
Windows XP SP2
Network:
Windows 2003 Server
Database:
MS SQL Server
Miscellaneous
Thread ID:
01564906
Message ID:
01564909
Views:
52
>>I keep my command window, data session window, and properties windows all docked together along the right-hand side of my VFP window. What's annoying is that every time I start VFP I have to re-dock the group of them to the right-hand side of my VFP window. Is there a way I can have this happen on it's own when I startup VFP? Obviously not a big deal - just been bothering me (for a while) ha.
>
>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
>
This for sure points me in the right direction (and I like the dual monitor trick too) - thanks!
ICQ 10556 (ya), 254117
Previous
Reply
Map
View

Click here to load this message in the networking platform