Larry Rebich Tip of the Month:

http://www.buygold.net/tips.html


I have seen various tips that show how to set a 'minimum' sized window
[form]. The tips are all about the same. They rely on providing the minimum
size in twips and use a call back to an API. Most rely on a message hook
that if not 'unhooked' causes VB to crash if the code is run in the IDE.

I took a somewhat different approach. I'm using Michael Culley's safe
subclassing OCX and some code I found at Allapi.Net [Resize.zip], some code
from Karl E. Peterson [FormBdr.zip] and some code from my September 1998 tip
of the month [LocationLocationLocation] and cut and pasted it into a class
module I call 'clsMinWindow'. Then I wrote a demo program to show how to use
the conglomeration to restrict a form's minimum and maximum size.

While I was at it I added a 'Moved' event. Now you can tell when a form is
moved.

Cheers,
Larry


--
Cheers,
Larry Rebich

More tips link to:
http://www.buygold.net/tips.html

Please:
No personal e-mail questions :-)