VBcoders Guest



Don't have an account yet? Register
 


Forgot Password?



Control Resizing on FormResize

by CHOE KyoungSik (1 Submission)
Category: Miscellaneous
Compatability: Visual Basic 3.0
Difficulty: Intermediate
Date Added: Wed 3rd February 2021
Rating: (5 Votes)

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.

Assumes
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.

Rate Control Resizing on FormResize

Download Control Resizing on FormResize

Download Control Resizing on FormResize (6 KB)

Control Resizing on FormResize Comments

No comments have been posted about Control Resizing on FormResize. Why not be the first to post a comment about Control Resizing on FormResize.

Post your comment

Subject:
Message:
0/1000 characters