Connecting Tech Pros Worldwide Forums | Help | Site Map

VB6 Form resize diable user from manually resizing it?

JT
Guest
 
Posts: n/a
#1: May 20 '07
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





Dean Earley
Guest
 
Posts: n/a
#2: May 21 '07

re: VB6 Form resize diable user from manually resizing it?


JT wrote:
Quote:
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 (dean.earley@icode.co.uk)
i-Catcher Development Team

iCode Systems
Dean Earley
Guest
 
Posts: n/a
#3: May 21 '07

re: VB6 Form resize diable user from manually resizing it?


Dean Earley wrote:
Quote:
JT wrote:
Quote:
> 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 (dean.earley@icode.co.uk)
i-Catcher Development Team

iCode Systems
CajunCoiler
Guest
 
Posts: n/a
#4: May 21 '07

re: VB6 Form resize diable user from manually resizing it?


You could cheat, and set it to style 3 (Fixed Dialog), and plant your own
Min/Max buttons
on the form. :)

"JT" <jtsoft@hotmail.comwrote in message
news:46505d6e$0$15096$4c368faf@roadrunner.com...
Quote:
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
>
>
>
>

Closed Thread


Similar Visual Basic 4 / 5 / 6 bytes