Quantcast
Channel: VBForums - Visual Basic 6 and Earlier
Viewing all articles
Browse latest Browse all 21243

Can this be simplfied

$
0
0
The below line is used to calculate the height of a Form based on the number of lines it has to print on the Form. I came up with this by just experimenting until it worked. You can see by the attached image how it makes the Form height. The important part is that the distance from the bottom of the last line to the bottom of the Form remains the same.

Height = (UBound(a) * Screen.TwipsPerPixelY) + (((UBound(a) + 1) * (20 * Screen.TwipsPerPixelY)) + 1500) - ((UBound(a) + 0) * (4 * 15))
Attached Images
 

Viewing all articles
Browse latest Browse all 21243

Trending Articles