VBcoders Guest



Don't have an account yet? Register
 


Forgot Password?



Quick, effective Forms resizing code.

by Ken Ashton (4 Submissions)
Category: Custom Controls/Forms/Menus
Difficulty: Beginner
Date Added: Wed 3rd February 2021
Rating: (6 Votes)

Quick, effective Forms resizing without a 'resize component'.

Assumes
Most 'resize controls/solutions' scale controls and font sizes proportionally. This is never what I actually want. Usually, GUI's have textboxes and list controls that can be simply stretched or shrunk as appropriate. Also, 'Tool' windows are nice when small, but it is really useful to allow users to stretch the window and see all text in the textbox (eg, nested foldernames). ' Just using an arbitrary fraction of the 'screen width' for a 'margin' constant works well for resizing but falls apart if the screen resolution or aspect ratio change, this approach avoids that problem. ' It simply uses the Form's TextWidth and TextHeight properties, fractions of which are assigned to two variables (used as the base unit for all static dimensions). ' A dummy project is included, as an example of how to Utilize these two derived constants. Switching resolution, aspect ratio or resizing should leave your form looking pretty much the same. ' Note: The method 'as is' does assume that the project is using the 'default' VB scalemodes and font sizes (which are perfectly suitable for most applications.) '

Rate Quick, effective Forms resizing code.

Download Quick, effective Forms resizing code.

Download Quick, effective Forms resizing code. (4 KB)

Quick, effective Forms resizing code. Comments

No comments have been posted about Quick, effective Forms resizing code.. Why not be the first to post a comment about Quick, effective Forms resizing code..

Post your comment

Subject:
Message:
0/1000 characters