-
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.
-
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
Forum Rules
|
Top DevX Stories
Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL
|
Bookmarks