Author Topic: upgrading solution to 3.97e but resource items are creating errors  (Read 2163 times)

doggo

  • Newbie
  • *
  • Posts: 23
    • View Profile
Archie,

I was updating my solution to 3.97e from 3.96a and got new forms imported no problem. But when I went to build, it would not accept the items I have in the "resource" folder:

this is from one of the designer forms that wont build:

 Me.ImageDisplayByValue2.ForeColor = System.Drawing.Color.WhiteSmoke
        Me.ImageDisplayByValue2.HighlightColor = System.Drawing.Color.Red
        Me.ImageDisplayByValue2.HighlightKeyCharacter = "!"
        Me.ImageDisplayByValue2.Image =

       Global.MfgControl.AdvancedHMI.My.Resources.Resources._051560_glossy_silver_icon_natural_wonders_star6_ps

        Me.ImageDisplayByValue2.KeypadText = Nothing
        Me.ImageDisplayByValue2.KeypadWidth = 300

I have some small .png images (like 051560_glossy...above) that are part of my forms and they display fine before but now they wont build in the new rev. FYI the path to the new 3.97e solution is different than the old 3.96A one, but since I did a "add existing items" with these graphics resources to the new solutions resources folder, I would think VBA would know they were in the new location now.

Any ideas?

As always, thanks for the excellent software tools and support.

Here's the actual VBA error:

Error   4   '_051560_glossy_silver_icon_natural_wonders_star6_ps' is not a member of 'MfgControl.AdvancedHMI.My.Resources.Resources'.   
C:\Users\Desktop\AdvancedHMIBetaV397e\AdvancedHMI\formtest.designer.vb   864   41   AdvancedHMI




« Last Edit: February 14, 2015, 04:15:46 PM by doggo »

Archie

  • Administrator
  • Hero Member
  • *****
  • Posts: 5322
    • View Profile
    • AdvancedHMI
Re: upgrading solution to 3.97e but resource items are creating errors
« Reply #1 on: February 14, 2015, 04:21:33 PM »
- Right click the AdvancedHMI project in Solution Explorer and select Properties
- Select the Resources tab
- Add Resource->Add Existing File
- Browse to the PNG files that should be part of your previous project
- Perform a Rebuild

Whenever you are upgrading from a 3.80 or later project, the easiest way to upgrade is to download and extract the latest Solution. Then replace the AdvancedHMI folder in the new solution with the AdvancedHMI folder from your previous solution. Open in Visual Studio and do a Rebuild All. This method is general easier and gives less problems.

doggo

  • Newbie
  • *
  • Posts: 23
    • View Profile
Re: upgrading solution to 3.97e but resource items are creating errors
« Reply #2 on: February 14, 2015, 04:34:16 PM »
That was it. Thanks!

doggo

  • Newbie
  • *
  • Posts: 23
    • View Profile
Re: upgrading solution to 3.97e but resource items are creating errors
« Reply #3 on: March 21, 2015, 10:53:17 PM »
Archie,

I upgraded recently to 398a from 397e using the project folder swap method. Works great. The only way it could be more seamless is if you were to put purchased controls in AdvancedHMI project folder instead of AdvancedHMIControls folder, so that any purchased controls move with the project folder, like any user-added resources do.

You should mention the folder swap method in your quickstart file, if you haven't already.