CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 7 of 7
  1. #1
    Join Date
    Apr 2005
    Posts
    51

    Deny resizing on form?

    Hi,

    I want to make a child-window fixed... not allow a user to expand/contract the child-window size.

    Which form property controls that?

    Thanks
    -Paul-

  2. #2
    Join Date
    Nov 2005
    Location
    Omaha, Nebraska, USA
    Posts
    696

    Re: Deny resizing on form?

    It's BorderStyle. Set it to FixedSingle (I think it's called, I know it's option 1, while Sizable, the default, is 2) and they can't change the size.

    Don't forget to reset Min Button back to True, though. Changing to FixedSingle sets Min and Max Button to false automatically.
    Last edited by ChaosTheEternal; November 11th, 2005 at 03:23 PM. Reason: Ha... if you don't want resizing, you wouldn't want maximizing either, right?

  3. #3
    Join Date
    Jun 2005
    Location
    JHB South Africa
    Posts
    3,772

    Thumbs up Re: Deny resizing on form?

    Quote Originally Posted by ChaosTheEternal
    Don't forget to reset Min Button and Max Button to True, though. Changing to FixedSingle sets them false.
    I'd Leave the max button to false.. if your creating a form that is not for resizing.

    But otherwize your 100% right..

    Gremmy
    Articles VB6 : Break the 2G limit - Animation 1, 2 VB.NET : 2005/8 : Moving Images , Animation 1 , 2 , 3 , User Controls
    WPF Articles : 3D Animation 1 , 2 , 3
    Code snips: VB6 Hex Edit, IP Chat, Copy Prot., Crop, Zoom : .NET IP Chat (V4), Adv. ContextMenus, click Hotspot, Scroll Controls
    Find me in ASP.NET., VB6., VB.NET , Writing Articles, My Genealogy, Forum
    All VS.NET: posts refer to VS.NET 2008 (Pro) unless otherwise stated.

  4. #4
    Join Date
    Nov 2005
    Location
    Omaha, Nebraska, USA
    Posts
    696

    Re: Deny resizing on form?

    Quote Originally Posted by GremlinSA
    I'd Leave the max button to false.. if your creating a form that is not for resizing.
    Doh. Yeah, might want to leave Max Button false.

    Thanks for pointing that out.

  5. #5
    Join Date
    Apr 2005
    Posts
    51

    Re: Deny resizing on form?

    Thanks Gremlin & Chaos

    That was exactly it!!

    Paul

  6. #6
    Join Date
    Dec 2005
    Posts
    28

    Re: Deny resizing on form?

    Quote Originally Posted by GremlinSA
    I'd Leave the max button to false.. if your creating a form that is not for resizing.

    But otherwize your 100% right..

    Gremmy

    I want to make a child-window fixed... not allow a user to expand/contract the child-window size.

    would you mind codeing it for me or show me how to code it step by step

    thanks

  7. #7
    Join Date
    Jun 2005
    Location
    JHB South Africa
    Posts
    3,772

    Re: Deny resizing on form?

    Quote Originally Posted by VBprogrammer2006
    I want to make a child-window fixed... not allow a user to expand/contract the child-window size.

    would you mind codeing it for me or show me how to code it step by step

    thanks
    You cannot code this..
    VB Books Online
    Syntax
    object.BorderStyle = [value]

    Applies To
    Form Object, Forms Collection, ....

    Returns or sets the border style for an object. For the Form object and the TextBox control, read-only at run time.
    As for the Min/Max button
    VB Books Online
    Syntax
    object.MinButton
    object.MaxButton

    Applies To
    Form Object, Forms Collection

    Returns. a value indicating whether a form has a Minimize/Maximize button.
    These properties have to be set at design time.. using the forms properties box on the righthand..

    Hope this Helps..


    Gremmy..
    Articles VB6 : Break the 2G limit - Animation 1, 2 VB.NET : 2005/8 : Moving Images , Animation 1 , 2 , 3 , User Controls
    WPF Articles : 3D Animation 1 , 2 , 3
    Code snips: VB6 Hex Edit, IP Chat, Copy Prot., Crop, Zoom : .NET IP Chat (V4), Adv. ContextMenus, click Hotspot, Scroll Controls
    Find me in ASP.NET., VB6., VB.NET , Writing Articles, My Genealogy, Forum
    All VS.NET: posts refer to VS.NET 2008 (Pro) unless otherwise stated.

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