Free Lessons
Courses
Seminars
TechHelp
Fast Tips
Templates
Topic Index
Forum
ABCD
 
Home   Courses   Index   Templates   Seminars   TechHelp   Forums   Help   Contact   Join   Order   Logon  
 
Home > TechHelp > Directory > Access > MoveSize < HasValue Function | Option Group >
Back to MoveSize    Comments List
Heres a class that does this Upload Images   Link   Email  
Gary James       
9 months ago
I had the same requirement that you have, so I wrote a VBA Class module that easily adds this feature to any form.

To use this class, import the file into your project, then set your Form "Border Style" to "Sizable" and "Min Max Buttons" to "None".  This code does NOT include support to restore a Form to a Maximized or Minimized state.

Option Compare Database
Option Explicit

'  place this at the top of the Forms code module:
Private sl As New SizeAndLocation

'  place this in the Forms Open Event
Private Sub Form_Open(Cancel As Integer)
   Set sl.MyForm = Me.Form
End Sub

'  place this in the Forms Unload Event
Private Sub Form_Unload(Cancel As Integer)
   sl.Save
   Set sl = Nothing
End Sub

And that's all you need to do for each form you want to restore size and location.   The Size and location data for each form is stored in a table called "Orientation"

The code is stored in a GitHub repository.  Open my repo then click on the Green CODE button, and select download Zip.  Here's the link to the Repository.

https://github.com/NfaToys/Access-VBA-Classes


Gary James       
9 months ago
The reason I wrote this class is because I have several forms that use anchoring to let the user resize the form and location on the fly to personal preference.   The class saves whatever size and location the user has established.

This thread is now CLOSED. If you wish to comment, start a NEW discussion in MoveSize.
 

 
 
 

The following is a paid advertisement
Computer Learning Zone is not responsible for any content shown or offers made by these ads.
 

Learn
 
Access - index
Excel - index
Word - index
Windows - index
PowerPoint - index
Photoshop - index
Visual Basic - index
ASP - index
Seminars
More...
Customers
 
Login
My Account
My Courses
Lost Password
Memberships
Student Databases
Change Email
Info
 
Latest News
New Releases
User Forums
Topic Glossary
Tips & Tricks
Search The Site
Code Vault
Collapse Menus
Help
 
Customer Support
Web Site Tour
FAQs
TechHelp
Consulting Services
About
 
Background
Testimonials
Jobs
Affiliate Program
Richard Rost
Free Lessons
Mailing List
PCResale.NET
Order
 
Video Tutorials
Handbooks
Memberships
Learning Connection
Idiot's Guide to Excel
Volume Discounts
Payment Info
Shipping
Terms of Sale
Contact
 
Contact Info
Support Policy
Mailing Address
Phone Number
Fax Number
Course Survey
Email Richard
[email protected]
Blog RSS Feed    YouTube Channel

LinkedIn
Copyright 2024 by Computer Learning Zone, Amicron, and Richard Rost. All Rights Reserved. Current Time: 7/23/2024 2:20:30 AM. PLT: 1s