Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Getting killed with Event ID errors 1000 and 1001
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00779857
Message ID:
00780277
Vues:
14
>If your are talking about the Forms Control, Layout toolbars etc. Could you post code or point to commands to control. I need to add that type of control to my env.


I have this code in a PRG located in my HOME() folder. It's a procedure, that I call from a menu in VFP6 and from the ToolBox in VFP 8.
LOCAL lcFontName, lcFontSize, lLeftSide

* Save font names to put them back
lcFontName = _Screen.FontName 
lcFontSize = _Screen.FontSize 

* I have 2 screens and stretch VFP 8 across them from left to right
* _VFP.Left = 0 puts VFP on the left edge of the left monitor
* The following gets the left side of the right monitor
lLeftSide  = (SYSMETRIC(21) - SYSMETRIC(3)) / FONTMETRIC(6,"Arial",10)

* Change font name to assist with specific placement
_Screen.FontName = "Arial"
_Screen.FontSize = 10

* If the Form Designer toolbar is currently active 
IF WEXIST("FORM DESIGNER")
   * Top of screen, on the left side of right monitor
   MOVE WINDOW "FORM DESIGNER" TO 0, lLeftSide
ENDIF

* If the Layout toolbar is currently active
IF WEXIST("LAYOUT")
   * Just under the Form Designer toolbar
   MOVE WINDOW "LAYOUT" TO 5, lLeftSide
ENDIF

* If the Form Controls toolbar is currently active
IF WEXIST("FORM CONTROLS")
   * Just under the Layout toolbar
   MOVE WINDOW "FORM CONTROLS" TO 11.5, lLeftSide
   * I have to occasionally resize this manually. 
   * I have not found a way to do it programmatically
ENDIF

* If the Color Palette toolbar is currently active
IF WEXIST("COLOR PALETTE")
   * Just under the Form Controls toolbar
   MOVE WINDOW "COLOR PALETTE" TO 23.625, lLeftSide
ENDIF

* I docked my View window with my Command window under the Properties window
*!*   IF WEXIST("VIEW") 
*!*      MOVE WINDOW "VIEW" TO 4.188, 111.50
*!*   ENDIF

* I use the toolbox, this places it on the bottom right of the left screen
IF WEXIST("TOOLBOX")
   SIZE WINDOW "TOOLBOX" TO 22.500,  43.250
   _oToolBox.Left = SYSMETRIC(21) - _oToolBox.Width - (SYSMETRIC(3) * 3)
   _oToolBox.Top = _Screen.Height - _oToolBox.Height - (SYSMETRIC(4) * 2) - SYSMETRIC(34)
ENDIF

* I docked the Document View window with my Command window
*!*   IF WEXIST("DOCUMENT VIEW")
*!*      MOVE WINDOW "DOCUMENT VIEW" TO 7.85, 134.6
*!*      SIZE WINDOW "DOCUMENT VIEW" TO 22.50, 43.25
*!*   ENDIF

* Set the font back to what it was before we started
_Screen.FontName = lcFontName
_Screen.FontSize = lcFontSize
When working with the other windows, use somthing like
* Dock properties window on right side of screen
DOCK WINDOW "Properties" POSITION 2
* Dock Docuement view tabbed over the View window
DOCK WINDOW "Document View" POSITION 4 Window "View"
* Dock Command window tabbed over the Docuemnt view 
DOCK WINDOW "Command" POSITION 4 Window "Document View"
* Dock the tabbed windows under the Properties window
DOCK WINDOW "Command" POSITION 3 Window "Properties"
Tracy
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform