maximising forms


DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 2 of 2

Thread: maximising forms

  1. #1
    Join Date
    Aug 2004
    Posts
    43,023

    maximising forms

    [Originally posted by Min]

    In my program I have the form set at certain size, its got a colourful background and everything, but when I press the maximize square (at the top right of the screen) the form itself maximises, but its contents doesn't. I havent been able to find anything useful on the subject. If anyone could help Id really apreciate it. Thanks, Min.

  2. #2
    Join Date
    Aug 2004
    Posts
    43,023

    Re:maximising forms

    [Originally posted by neophile]

    Contents maximizing? You need to resize them manually. Usually, just record the distance between, for example, the width of the control and the width of its container.
    To demonstrate, put a PictureBox on a Form, paste the following, and resize the window at runtime...



    Option Explicit

    Private mW As Long
    Private mH As Long


    Private Sub Form_Load()
    mW = Me.Width - Picture1.Width
    mH = Me.Height - Picture1.Height
    End Sub

    Private Sub Form_Resize()
    On Error Resume Next
    Picture1.Width = Me.Width - mW
    Picture1.Height = Me.Height - mH
    On Error GoTo 0
    End Sub



    I hope this gets you started.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center