Link to home
Start Free TrialLog in
Avatar of perkster
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
Avatar of glass_cookie
glass_cookie

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Larry Rebich gives a method of accomplishing this task in his site at: http://www.buygold.net/v04n11/v04n11.html

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.
Avatar of corvanderlinden
corvanderlinden

see http://www.vb2themax.com/Item.asp?PageID=TipBank&ID=177

you can also download the MsgHook DLL at that side
Avatar of perkster

ASKER

Perfect.  Thanks.