Search code examples
vb6resolution

How to resize all forms to specific resolution including controls


I am able to resize my current main form by doing this:

Form1.Hight = Screen.TwipsPerPixelY * 600
Form1.Width = Screen.TwipsPerPixelX * 800

The issue is my program contains more forms that open up. I want them all to resize to this resolution, including the controls.

How can I do this?


Solution

  • Create a function that loops through all the controls in your project and create global variables that will be accessed in that function.

    Use this function when you want to resize