Results 1 to 9 of 9
  1. #1
    Join Date
    Mar 2004
    Posts
    361

    Unanswered: Adjust Form Location

    Does anyone know what property to adjust to raise/lower a form after it is opened by a switchboard? My form is to low in the window. Thanks

  2. #2
    Join Date
    Mar 2004
    Location
    Nashville, TN
    Posts
    557
    If I am not mistaken you have to adjust the top and left properties. You probably can put a function in the OnLoad() function of the form to set it correctly.

    Or you could open the form click-drag on the title bar where you want it and press ctrl + s

    Close the form and open again see if it is in the same place you put it. If it isnt do the the above steps except put it in design view first.

    JS
    Have you ever thought about thinking on purpose?

    Jarvis Stubblefield
    Patriot Designs
    Web/Database Development and Consulting
    The-Patriot.net by Patriot Designs

  3. #3
    Join Date
    Nov 2002
    Location
    Norway
    Posts
    239

    Form possition

    Try this on "On Open" event of your form

    Me.Move Left:=5* 567, Top:=5* 567, Width:=10 * 567, Height:=10 * 567


    This will set your form 5cm from top and left and set width and hight of the form to 10 cm. Exclude width and hight if you like.


    (twip: Unit of measurement that is equal to 1/20 of a point, or 1/1440 of an inch. There are 567 twips in a centimeter.)

    sincerely
    Vestigo

  4. #4
    Join Date
    Oct 2003
    Location
    Ger
    Posts
    1,969
    Provided Answers: 1
    Use DoCmd.MoveSize ,Right, Down, Width, Height

  5. #5
    Join Date
    Aug 2003
    Posts
    106

    Position on screen

    Does anyone know how to position the form centre screen? I.e how to find out how many twips there are on the current monitor?

  6. #6
    Join Date
    Mar 2004
    Location
    Nashville, TN
    Posts
    557
    I dont know how to find the amount of twips for the current screen, but there is a property that you can set to make the form center on the screen.

    JS
    Have you ever thought about thinking on purpose?

    Jarvis Stubblefield
    Patriot Designs
    Web/Database Development and Consulting
    The-Patriot.net by Patriot Designs

  7. #7
    Join Date
    Aug 2003
    Posts
    106

    Ony when the application window is visible

    I think the property only applies to the centre of the Microsoft Access Window. I have hidden the Access window so that only the form is displayed and would like to try to automatically centre the form on the screen...

    Any ideas?

  8. #8
    Join Date
    Mar 2004
    Location
    Nashville, TN
    Posts
    557
    Oh that true... hmm

    Interesting I didnt know you could hide the access window. That is cool.

    Um back to screen center. I am unable to think of anything right now.

    JS
    Have you ever thought about thinking on purpose?

    Jarvis Stubblefield
    Patriot Designs
    Web/Database Development and Consulting
    The-Patriot.net by Patriot Designs

  9. #9
    Join Date
    Aug 2003
    Posts
    106
    Private Declare Function IsWindowVisible Lib "user32" (ByVal hwnd As Long) As Long
    Dim dwReturn As Long

    Const SW_HIDE = 0
    Const SW_SHOWNORMAL = 1
    Const SW_SHOWMINIMIZED = 2
    Const SW_SHOWMAXIMIZED = 3

    Private Declare Function ShowWindow Lib "user32" (ByVal hwnd As Long, _
    ByVal nCmdShow As Long) As Long

    Public Function fAccessWindow(Optional Procedure As String, Optional SwitchStatus As Boolean, Optional StatusCheck As Boolean) As Boolean
    If Procedure = "Hide" Then
    dwReturn = ShowWindow(Application.hWndAccessApp, SW_HIDE)
    End If
    If Procedure = "Show" Then
    dwReturn = ShowWindow(Application.hWndAccessApp, SW_SHOWMAXIMIZED)
    End If
    If Procedure = "Minimize" Then
    dwReturn = ShowWindow(Application.hWndAccessApp, SW_SHOWMINIMIZED)
    End If
    If SwitchStatus = True Then
    If IsWindowVisible(hWndAccessApp) = 1 Then
    dwReturn = ShowWindow(Application.hWndAccessApp, SW_HIDE)
    Else
    dwReturn = ShowWindow(Application.hWndAccessApp, SW_SHOWMAXIMIZED)
    End If
    End If
    If StatusCheck = True Then
    If IsWindowVisible(hWndAccessApp) = 0 Then
    fAccessWindow = False
    End If
    If IsWindowVisible(hWndAccessApp) = 1 Then
    fAccessWindow = True
    End If
    End If
    End Function

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •