
How to make minimizable, but non-stretch form?
Quote:
>VB4/32...
Well I'm still using VB3/Win3.1x :-)
Quote:
>I know how to make a form that's sizable so I can minimize it, but then
>that also means it can be stretched. So, I add code to undo a window
>stretch after its done (use Screen.ActiveForm.Width=x, etc., in resize
>event). But I hate the fact that it's a kludge and the window can be
>stretched. So, how do I make a minimizable, but non-stretch form?
For Win 3.1x, this is in the KB:
Q118376: How to Lock a Form so it Cannot Be Moved
Oddly enough, this is done by removing the "Resize" menu item from the
control box. In Win3.1x, that's the drawer in the top left of the
form, next to the title bar.
Apparently, if you remove the "Resize" menu item, you can no longer
grasp the border of the form, so the size is fixed. The mouse still
changes to a double arrow when it's over the edge, though.
Also, by removing the "Move" menu item, you can no longer grab the
title bar, and the position of the form can no longer be changed
using the mouse alone.
So set the form's MaxButton property to False, MinButton to True, and
add the appropriate code in the Form_Load procedure, and things should
work out.
Anyway, I would be surprised if things didn't work in a similar way in
Win95. Most likely, there will be some equivalent article in the KB,
specifically for VB4/Win95.
Hope I got you going,
Bart Lateur,
Gent, Belgium.
--- Embracing the KIS principle: Keep It Simple
Quote:
> and I won't call people stupid, just to get an extra 'S'!