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?
Who is Participating?
glass_cookieConnect With a Mentor Commented:

Here's a file for you over the net:

Description: Restrict a form's minimum and maximum width and height (3K)

That's it!

glass cookie : )
Larry Rebich gives a method of accomplishing this task in his site at:

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.

you can also download the MsgHook DLL at that side
perksterAuthor Commented:
Perfect.  Thanks.
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.