CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 6 of 6

Thread: Resizing form

  1. #1
    Join Date
    Feb 2001
    Posts
    27

    Resizing form

    How can i stop a form being made smaller that a size X, Y, i thought this would be possible by using the resize function however it does not seem to actually override the inbuilt function, so the result is i cannot stop the form being made smaller!!

    i would be vary greatfull if somone could point me in the right direction.


  2. #2
    Join Date
    Aug 2000
    Location
    NY, USA
    Posts
    632

    Re: Resizing form

    This works:

    private Sub Form_Resize()
    If Form1.Width < 3500 then Form1.Width = 3500
    If Form1.Height < 1000 then Form1.Height = 1000
    End Sub




    Vlad


  3. #3
    Join Date
    Jun 2000
    Location
    Nepal
    Posts
    108

    Re: Resizing form

    Is there an easy way to prevent even the outline (that appears while outlining) from becoming smaller?


  4. #4
    Join Date
    Jun 2000
    Location
    Nepal
    Posts
    108

    Re: Resizing form

    Is there an easy way to prevent even the outline (that appears while resizing) from becoming smaller?


  5. #5
    Join Date
    Dec 1999
    Location
    Dublin, Ireland
    Posts
    1,173

    Re: Resizing form

    Something like subclassing the form and intercepting it's WM_SIZE messages?

    Yup, that'd work - the example code is at:
    http://www.merrioncomputing.com/vb_subclass2.htm

    HTH,
    Duncan



    -------------------------------------------------
    Ex. Datis: Duncan Jones
    Merrion Computing Ltd
    http://www.merrioncomputing.com
    '--8<-----------------------------------------
    NEW -The printer usage monitoring application
    '--8<------------------------------------------

  6. #6
    Join Date
    Jun 2000
    Posts
    104

    Re: Resizing form

    set the form's borderstyle property to none.


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

Featured