Previous | Index | Next 

[INFO] Negative values for ScaleWidth and ScaleHeight properties cause incorrect output in Microsoft Vista

A little-known VB6 feature allows you to assign negative values to ScaleWidth and ScaleHeight properties to achieve interesting graphical effects. If you assign a negative value to ScaleWidth property the graphic result is the “mirrored” version of what you’d achieve if the value were positive: an arrow pointing to the left would now point to the right, and vice versa. If you assign a negative value to the ScaleHeight property the graphic result is the “upside-down” version of what you’d achieve if the value were positive.

The bad news is that when you run the original VB6 code under Microsoft Vista you might obtain a slightly different result: the output is correctly mirrored (or rendered in upside-down fashion) yet it is translated horizontally or vertically. For the original VB6 application to work correctly you might need to test the operating system version and adjust the value of ScaleLeft or ScaleTop properties if the program is running under Microsoft Vista.

The good news is that VB Migration Partner fully supports negative values for ScaleWidth and ScaleHeight properties and behaves in exactly the same way under Microsoft Vista. This means that any workaround you’ve adopted in VB6 will work correctly in the converted VB.NET application.

 

Previous | Index | Next