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

Thread: VB Forms

  1. #1
    Join Date
    Feb 2000
    Posts
    1

    VB Forms

    How can i restrict the size of a form?
    The 'Resize' event seems a bit late, and the results look awful.


  2. #2
    Guest

    Re: VB Forms

    You will need to subclass it.
    go to www.mvps.org/vbnet where Randy Birch has an example of how to achieve this.


  3. #3
    Join Date
    Jan 2000
    Location
    MO, USA
    Posts
    1,506

    Re: VB Forms

    If you dont want the user to be able to resize the form at all, set the border style property to 1 - Fixed Single. If you want the user to be able to resize the form, but only within a range, then the resize event is about the only other easy solution. I know there are some API calls that can stop the flicker, but I'm not familiar with them. I'm sure someone else here knows what they are.

    Good luck,
    John

    John Pirkey
    MCSD
    www.ShallowWaterSystems.com
    John Pirkey
    MCSD (VB6)
    http://www.stlvbug.org

  4. #4
    Join Date
    Jan 2000
    Posts
    45

    Re: VB Forms

    'hope this helps
    Private Sub Timer1_Timer()
    If Form1.Height > 4260 Then
    Form1.Height = 3300
    End If
    End Sub



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