Previous | Index | Next 

[PRB] ScaleHeight and ScaleWidth properties aren’t correctly serialized at design-time

VB Migration Partner supports the ScaleHeight and ScaleWidth properties of form objects. However, the design-time value of these properties is lost as soon as the form is modified in any way inside Visual Studio’s designer.

As of this writing, the only solution to this problem is assigning these properties via code, inside the Form_Load event handler. The simplest way to do so is by means of the InsertStatement pragma:

        Private Sub Form_Load()
            '## InsertStatement  Me.ScaleHeight = 12156.74
            '## InsertStatement  Me.ScaleWidth = 16342.49
            .... 
        End Sub

 

Previous | Index | Next