home *** CD-ROM | disk | FTP | other *** search
- ' TestLay.Bas - Subroutines, Functions and Variables used by TestLay.Mak
- ' 94/05/18 Copyright 1994, Larry Rebich, The Bridge, Inc.
- Option Explicit
- DefInt A-Z
-
- ' Global Grid Constants
- Global Const GridFileName = "TestLay.Lay" 'store grid layouts here
- Global GridPathAndFileName As String 'full path and file name of layout file
-
- Global Const GridDBName = "TestLay.Mdb" 'database name
-
- Global Const GridForTable = "TestLay" 'table identifier with saved file
-
- ' Which grid setting, can be any name and more than two
- Global Const GridFactory = "Factory"
- Global Const GridCurrent = "Current"
-
- Function AddBackSlash (ThePath As String) As String
- If Right$(ThePath, 1) <> "\" Then
- ThePath = ThePath + "\"
- End If
- AddBackSlash = ThePath
- End Function
-
- Sub CenterForm (TheForm As Form, OffsetLeft As Integer, OffsetTop As Integer)
- Dim FLeft As Integer
- Dim FTop As Integer
- ' Debug.Print "Screen.Width= " & Str$(Screen.Width)
- ' Debug.Print "Screen.Height=" & Str$(Screen.Height)
- If TheForm.WindowState <> 0 Then Exit Sub
- FLeft = ((Screen.Width - TheForm.Width) \ 2) + OffsetLeft 'Center form horizontally.
- FTop = (((Screen.Height - TheForm.Height) \ 2) + OffsetTop) * .85 'Center form vertically.
- If TheForm.Left = FLeft And TheForm.Top = FTop Then Exit Sub
- TheForm.Move FLeft, FTop
- End Sub
-
-