How To Limit a Window's Minimum and Maximum Size (185733)
The information in this article applies to:
- Microsoft Visual Basic Learning Edition for Windows 6.0
- Microsoft Visual Basic Professional Edition for Windows 6.0
- Microsoft Visual Basic Enterprise Edition for Windows 6.0
- Microsoft Visual Basic Control Creation Edition for Windows 5.0
- Microsoft Visual Basic Learning Edition for Windows 5.0
- Microsoft Visual Basic Professional Edition for Windows 5.0
- Microsoft Visual Basic Enterprise Edition for Windows 5.0
This article was previously published under Q185733 SUMMARY
By default, Visual Basic allows a form to be resized to any size you want
provided the BorderStyle is set appropriately. At times, it may be
desirable or necessary to limit the range of a window's size (such that it
cannot be smaller or larger than a predetermined size).
For example, the Windows accessory, Microsoft Paint, prevents its window
from being sized below a certain point. This is done to allow the user to
always see at least part of the image they are editing.
With the aid of Windows API functions, you can achieve this same
functionality within your Visual Basic application.
REFERENCES
For additional information, please see the following article(s) in the
Microsoft Knowledge Base:
168795
: How To Hook Into a Window's Messages Using AddressOf
Modification Type: | Minor | Last Reviewed: | 7/1/2004 |
---|
Keywords: | kbGrpDSVB kbhowto KB185733 kbAudDeveloper |
---|
|