perkster
asked on
Minimum form size
I want to be able to set a minimum form size (i.e. if a user tries to size the form smaller than X,Y, the form will not shrink. I have tried to do this by creating paramters in the form.resize area, but I do not like the shakey snap-back look of the form. I have seen forms where you cannot drag the outter edge inward past a certain point. This is what I want. Can someone help?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
see http://www.vb2themax.com/Item.asp?PageID=TipBank&ID=177
you can also download the MsgHook DLL at that side
you can also download the MsgHook DLL at that side
ASKER
Perfect. Thanks.
The resize is not perfectly clean - you are able to move the mouse into the "restricted" area when resizing, yet the form's border does not, unlike what I believe you attempted.
This already uses subclassing to accomplish the task. If you need it any cleaner and you might have dig into the API, hooking mousedown event repositioning the mouse cursor.