Visual Basic 2005 Power Packs 2 Readme

Table of Contents

·     1.1. Product Issues

·     1.2. Application Deployment Issues

§  1.2.1. Package.xml contains wrong argument

·     2.1 Visual Basic 2005 Power Packs Forum

·     2.2 Visual Basic 2005 Power Packs Suggestion Center

 

1. Known Issues

1.1 Product Issues

1.1.1 Shape Control Name property is not updated when the name of the control is changed in the Property Page.

If the shape control's name is changed via the properties page in the IDE the value of the control's Name property is not updated to reflect this change.

This means accessing the Name property of the shape control will result in the original value being returned instead of the new name.

For example, If you add an OvalShape to Form1 and rename the control to MyOvalShape and then attempt to access the Name property at runtime in my code the value that is returned will be the original name and not the new name.  Also if you attempt to access the shape via the Shapes collection with the new name a runtime error will occur.

      Private Sub MyOvalShape_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) _ 
         Handles MyOvalShape.Click

        'this will return the original OvalShape1 value instead of the new name

        MsgBox(MyOvalShape.Name)

 

        'the following line will result in a runtime error

        MsgBox(ShapeContainer1.Shapes.ContainsKey("MyOvalShape"))

   End Sub


The problem is the .Designer.vb file is not being updated when the name is changed in the IDE with the property page

For example, this is the entry in the .Designer.vb file (to see the .designer file you will need to show all files from the Solution Explorer) from this scenario.

'MyOvalShape

        '

        Me.MyOvalShape.Location = New System.Drawing.Point(49, 112)

        Me.MyOvalShape.Name = "OvalShape1"

To resolve this issue:

You will need to change the value of the Name property either in the .designer.vb file or with code during the form load event.

 'MyOvalShape

        '

        Me.MyOvalShape.Location = New System.Drawing.Point(49, 112)

        Me.MyOvalShape.Name = "MyOvalShape"

 

If you do not want to make the change in the .designer file you can simply change the name in the Form_Load event. 

For example:

Private Sub Form1_Load(ByVal sender As Object, ByVal e As System.EventArgs) _
Handles Me.Load

        Me.MyOvalShape.Name = "MyOvalShape"

 

1.2 Application Deployment Issues

1.2.1 Package.xml file contains the wrong argument.

The Package.xml file installed with the Visual Basic 2005 Power Packs 2.0 contains the wrong argument for the Package File Command. This will cause applications that use the Visual Basic 2005 PowerPacks bootstrapper package to install the Microsoft.VisualBasic.PowerPacks assembly to fail to install correctly.

To resolve this issue:

1)     Make a copy of the Package.xml found in the folder \Program Files\Microsoft Visual Studio 8\SDK\v2.0\BootStrapper\Packages\VBPowerPacks\en for a backup copy.

 

2)     Open the original Package.xml file with Notepad.

 

3)     Edit the following line:

 

<Command PackageFile="VisualBasicPowerPacksRedist.msi" Arguments="/q:a /c:"install /q /l""
               EstimatedInstalledBytes
="5000000"

 

Removing the extra command line arguments so that it now looks like:

 

<Command PackageFile="VisualBasicPowerPacksRedist.msi" Arguments="/qn"
               EstimatedInstalledBytes
="5000000"

 

4)     Save the File and exit Notepad.

 

2. Related Links

2.1 Visual Basic 2005 Power Packs Forum 

2.2 Visual Basic 2005 Power Packs Suggestion Site

© 2007 Microsoft Corporation. All rights reserved.