Connecting Tech Pros Worldwide Help | Site Map

VB6 Form resize diable user from manually resizing it?

  #1  
Old May 20th, 2007, 03:45 PM
JT
Guest
 
Posts: n/a
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




  #2  
Old May 21st, 2007, 08:55 AM
Dean Earley
Guest
 
Posts: n/a

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
  #3  
Old May 21st, 2007, 08:55 AM
Dean Earley
Guest
 
Posts: n/a

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
  #4  
Old May 21st, 2007, 01:45 PM
CajunCoiler
Guest
 
Posts: n/a

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 Threads
Thread Thread Starter Forum Replies Last Post
VB6 prevent user manually resizing form? Haren786 answers 2 August 23rd, 2007 09:57 PM