469,327 Members | 1,209 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,327 developers. It's quick & easy.

VB6 Form resize diable user from manually resizing it?

JT
have a VB6 project that on the form I have set the BorderStile to 2 -
sizable and created a function to resize the form and its controls min or
max.

Although, I am trying to find a way to disable the user from dragging the
bottom right hand corner from resizing. I only want min and max.

Any ideas how I can do this in code. If so, can I get an example of this
please?

Thank you,
JT


May 20 '07 #1
3 9345
JT wrote:
have a VB6 project that on the form I have set the BorderStile to 2 -
sizable and created a function to resize the form and its controls min or
max.

Although, I am trying to find a way to disable the user from dragging the
bottom right hand corner from resizing. I only want min and max.

Any ideas how I can do this in code. If so, can I get an example of this
please?
If you want to have the standard minimise and maximise buttons, you will
need to subclass and handle the WM_GETMINMAXINFO message.

--
Dean Earley (de*********@icode.co.uk)
i-Catcher Development Team

iCode Systems
May 21 '07 #2
Dean Earley wrote:
JT wrote:
> have a VB6 project that on the form I have set the BorderStile to 2 -
sizable and created a function to resize the form and its controls min or
max.

Although, I am trying to find a way to disable the user from dragging the
bottom right hand corner from resizing. I only want min and max.

Any ideas how I can do this in code. If so, can I get an example of this
please?

If you want to have the standard minimise and maximise buttons, you will
need to subclass and handle the WM_GETMINMAXINFO message.
Or you could use a hack and just set the form size in the Resize event.
This will cause it to flicker.

With both these methods you MUST take into account the form border as it
is different for different windows versions and themes.

--
Dean Earley (de*********@icode.co.uk)
i-Catcher Development Team

iCode Systems
May 21 '07 #3
You could cheat, and set it to style 3 (Fixed Dialog), and plant your own
Min/Max buttons
on the form. :)

"JT" <jt****@hotmail.comwrote in message
news:46***********************@roadrunner.com...
have a VB6 project that on the form I have set the BorderStile to 2 -
sizable and created a function to resize the form and its controls min or
max.

Although, I am trying to find a way to disable the user from dragging the
bottom right hand corner from resizing. I only want min and max.

Any ideas how I can do this in code. If so, can I get an example of this
please?

Thank you,
JT


May 21 '07 #4

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

11 posts views Thread by Jozef | last post: by
12 posts views Thread by Søren Reinke | last post: by
reply views Thread by 23s | last post: by
11 posts views Thread by Ajith Menon | last post: by
6 posts views Thread by Funky | last post: by
1 post views Thread by CARIGAR | last post: by
reply views Thread by zhoujie | last post: by
reply views Thread by suresh191 | last post: by
reply views Thread by harlem98 | last post: by
reply views Thread by listenups61195 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.