471,854 Members | 1,616 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,854 software developers and data experts.

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 9493
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
NeoPa
reply views Thread by NeoPa | last post: by
reply views Thread by YellowAndGreen | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.