Search Tools Links Login

Control Resizing on Form_Resize


You know... Real resize function needs some information about what to do. It cannot be done without information. The program even doesn't know what I want until I give it!!!
For example, Let's say you have 4 controls.
First one is command box, so it should be moved on form_resize.
Second one is text box, so it should be wider or vice versa on form_resize.
Third one is multi-line text box, so it should vary on width and height both.
Fourth one is a label below the third one, so it should move vertically.
You can DEFINE very easily how your controls should resized according to the parent form's resizing.
If you are doing a lot of forms(maybe over 30, 50, 100?), this function will be very helpful.

Original Author: CHOE KyoungSik

Assumptions

ListBox and DBList will be shrinking more and more when you maximize and minimize.
You should code additionally on Form_Resize,
like this:
If Me.Height > 1000 Then
ListBox1.Height = Me.Height - 300
End If

Side Effects

If one control has two child controls, its resize definition will be inherited from the first child on EvtFormResize() arguments.
You'll see what I mean if you take care of the frame control on the sample project.

About this post

Posted: 2002-06-01
By: ArchiveBot
Viewed: 87 times

Categories

Visual Basic 6

Attachments

CODE_UPLOAD1216711282000.zip
Posted: 9/3/2020 3:45:00 PM
Size: 6,741 bytes


Loading Comments ...

Comments

No comments have been added for this post.

You must be logged in to make a comment.