Results 1 to 5 of 5

Thread: MoveSize (A2k)

  1. #1
    Silver Lounger
    Join Date
    Jun 2002
    Location
    Cheadle, Staffordshire
    Posts
    2,177
    Thanks
    0
    Thanked 0 Times in 0 Posts

    MoveSize (A2k)

    With using the following- DoCmd.MoveSize Right:=2880, Down:=1240 to align some forms.

    It works fine, but to get the correct alignment, I have to change the values then preview, over and over again until I am happy with the positioning.

    Is their a way to see the co-ordinates in form view, so positioning is made easier before going back to change the code.
    Perhaps a utility some-one knows about !!

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: MoveSize (A2k)

    Perhaps somebody else will come up with a real utility. Here is a little thing that may help in the meantime. It's a zipped Access 97 database. Its key elements are:

    frmMoveSize: a popup form with a combo box listing all forms in the database and text boxes displaying the left, top, width and height of the form selected in the combo box; all sizes in twips, just as needed by MoveSize (1 inch = 72 points = 1440 twips). The text boxes are refreshed every second by an OnTimer routine. The combo box doesn't update itself while the form is open. If you add, delete or rename forms just close and reopen frmMoveSize.

    modGetRD: a module with a lot of WinAPI functions. Don't ask me how they work. It is based on a module in the form samples database for Access 97 from Microsoft.

    The other form, frmDummy, is just for playing around with. It's not needed for anything else.

    If you want to use this in your own database, import frmMoveSize and modGetRD. The code needs a reference to the Microsoft DAO 3.n Object Library in Tools/References... (the version for Access 2000 is 3.6)
    Attached Files Attached Files

  3. #3
    Silver Lounger
    Join Date
    Jun 2002
    Location
    Cheadle, Staffordshire
    Posts
    2,177
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: MoveSize (A2k)

    Hans, this is perfect.

    By creating an Autokey Macro, I can call the form from anywhere.

    Saved me hrs, Cheers

  4. #4
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: MoveSize (A2k)

    Here is a slightly improved version. Instructions as for the original version. The only difference is that frmMoveSize now has a "Refresh list" button that updates the list of forms in the combo box, so you don't need to close and reopen it.
    Attached Files Attached Files

  5. #5
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Update of MoveSize

    The version as posted in <post#=205121>post 205121</post#> (in this thread) runs into problems if the number of forms in the database is very large. (Thanks to Dave Willett for pointing this out)

    Here is a new version that only lists open forms. In addition, you can now select the unit in which the size and position are displayed (inches, centimeters, points or twips).

    To use it in your own application, copy the form frmMoveSize and the module modGetRD from the attached database to yours.
    Attached Files Attached Files

Posting Permissions

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