by Co2 (1 Submission)
Category: Custom Controls/Forms/Menus
Compatability: Visual Basic 3.0
Difficulty: Advanced
Date Added: Wed 3rd February 2021
Rating: (5 Votes)
This code restrict the window size using a subclassing dll (Created by people from www.vbaccelerator.com). It consumes the WM_GETMINMAXINFO message. You can restrict the minimum and maximum tracking width and height. Also, you can restrict the maximized window left, top, height, width. I've wrote the code in a class for reuse.
Inputs
Optionals:
MaxLeft
MaxTop
MaxWidth
MaxHeight
MaxTrackWidth
MaxTrackHeight
MinTrackWidth
MinTrackHeight
Assumes
If you didn't know about those guys from www.vbaccelerator.com, take a look now ! It worth it.
Side Effects
If you push the End button in the Visual Basic developpement interface while the control is in use, vb will end in an error. This is cause by the subclassing dll.
API DeclarationsIncluded.