VB6 Form resize diable user from manually resizing it?

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • JT

    VB6 Form resize diable user from manually resizing it?

    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

    #2
    Re: VB6 Form resize diable user from manually resizing it?

    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_GETMINMAXINF O message.

    --
    Dean Earley (dean.earley@ic ode.co.uk)
    i-Catcher Development Team

    iCode Systems

    Comment

    • Dean Earley

      #3
      Re: VB6 Form resize diable user from manually resizing it?

      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_GETMINMAXINF O 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@ic ode.co.uk)
      i-Catcher Development Team

      iCode Systems

      Comment

      • CajunCoiler

        #4
        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 ...
        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
        >
        >
        >
        >

        Comment

        Working...