Results 1 to 24 of 24

Thread: I need to make my form not resize to anything smaller than...

Hybrid View

  1. #1
    Cumbrian Milk's Avatar
    Join Date
    Jan 2007
    Location
    0xDEADBEEF
    Posts
    2,448

    Re: I need to make my form not resize to anything smaller than...

    Quote Originally Posted by vbman213
    I removed that and it crashes...
    You do have to be careful when sub classing

    Did you remove
    Code:
     'Keep the form only as wide as MAX_WIDTH
            If (r.RIGHT - r.Left > MAX_WIDTH) Then
                Select Case wParam
                    Case WMSZ_LEFT, WMSZ_BOTTOMLEFT, WMSZ_TOPLEFT
                        r.Left = r.RIGHT - MAX_WIDTH
                    Case WMSZ_RIGHT, WMSZ_BOTTOMRIGHT, WMSZ_TOPRIGHT
                        r.RIGHT = r.Left + MAX_WIDTH
                End Select
            End If
            
            'Keep the form only as tall as MAX_HEIGHT
            If (r.Bottom - r.Top > MAX_HEIGHT) Then
                Select Case wParam
                    Case WMSZ_TOP, WMSZ_TOPLEFT, WMSZ_TOPRIGHT
                        r.Top = r.Bottom - MAX_HEIGHT
                    Case WMSZ_BOTTOM, WMSZ_BOTTOMLEFT, WMSZ_BOTTOMRIGHT
                        r.Bottom = r.Top + MAX_HEIGHT
                End Select
            End If
    because thats what I meant and it works for me.

  2. #2
    New Member
    Join Date
    Jun 2007
    Posts
    9

    Re: I need to make my form not resize to anything smaller than...

    The other way around is to put the resize command at Mouse Up event. So let the user resize the window as they like but once the Mouse up event occurs, it will be back to the desired size.

    At lease there will no flickering, i promise

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width