application window

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • sweetsugar
    New Member
    • Apr 2010
    • 5

    application window

    how can I control the size of application window?
  • ADezii
    Recognized Expert Expert
    • Apr 2006
    • 8834

    #2
    Originally posted by sweetsugar
    how can I control the size of application window?
    Are you referring to Minimizing/Maximizing the Main Access Window?

    Comment

    • mseo
      New Member
      • Oct 2009
      • 183

      #3
      hi
      first if the your application window is a form:
      you can use this code for controlling the size of your form
      Code:
      Private Sub Form_Open(Cancel As Integer)
          DoCmd.MoveSize Height = value
          DoCmd.MoveSize Down = value
          DoCmd.MoveSize Width = value
      End Sub
      Hope this helps

      Comment

      • sweetsugar
        New Member
        • Apr 2010
        • 5

        #4
        Originally posted by ADezii
        Are you referring to Minimizing/Maximizing the Main Access Window?
        how can I set specific width,hieght for access window . the user can't change the size

        Comment

        • ADezii
          Recognized Expert Expert
          • Apr 2006
          • 8834

          #5
          Originally posted by sweetsugar
          how can I set specific width,hieght for access window . the user can't change the size
          Again, is it the 'Main' Access Window or a Form? Do you simply wish to Minimize/Maximize the 'Main' Access Window/Form, or do you wish to Resize it?

          Comment

          • sweetsugar
            New Member
            • Apr 2010
            • 5

            #6
            I want to resize Main access window

            Comment

            • ADezii
              Recognized Expert Expert
              • Apr 2006
              • 8834

              #7
              Originally posted by sweetsugar
              I want to resize Main access window
              You would have to send the Handle of the Main Access Window via Application.hWn dAccessApp to at least 1 or 2 API Funcdtions in order to accomplish this.

              Comment

              • sweetsugar
                New Member
                • Apr 2010
                • 5

                #8
                How can I do this?

                Comment

                • ADezii
                  Recognized Expert Expert
                  • Apr 2006
                  • 8834

                  #9
                  Originally posted by sweetsugar
                  How can I do this?
                  It is a little complicated, but you can search for Help on the SetWindowPos() API Function, which will allow you to precisely size the Main Access Window among other things. The Declaration for this Function is:
                  Code:
                  Declare Function SetWindowPos Lib "user32.dll" (ByVal hwnd As Long, ByVal hWndInsertAfter As Long, ByVal x As Long, ByVal y As Long, ByVal cx As Long, ByVal cy As Long, ByVal wFlags As Long) As Long
                  P.S. - Be sure to pass Application.hWn dAccessApp as the 1st Argument to the Function (Handle to the Access Window).

                  Comment

                  Working...