AdvancedHMI Software

General Category => Open Discussion => Topic started by: martinav on June 23, 2021, 03:04:47 PM

Title: SelectorSwitch causes compile error
Post by: martinav on June 23, 2021, 03:04:47 PM
I am using SelectorSwitch for the first time.  When I select drop it in from the toolbox, I get this when I try to run it:

Please see attachments:

(https://www.advancedhmi.com/forum/index.php?action=dlattach;topic=2933.0;attach=5433;image)

(https://www.advancedhmi.com/forum/index.php?action=dlattach;topic=2933.0;attach=5435;image)
Title: Re: SelectorSwitch causes compile error
Post by: Archie on June 23, 2021, 03:12:42 PM
The MainForm.resx must have been downloaded from the internet. Move that file out of the AdvancedHMI directory
Title: Re: SelectorSwitch causes compile error
Post by: martinav on June 23, 2021, 03:17:25 PM
The MainForm.resx must have been downloaded from the internet. Move that file out of the AdvancedHMI directory

Ok, makes sense, but then I get an error that it cannot be found.  So, not sure where to go with this.

I delete the switch, then add back.  Then the original issue repeats.

What i'm needing is a simple on/off toggle.  If this is achievable with a different object, I'm open to that. 

Thanks.
Title: Re: SelectorSwitch causes compile error
Post by: Archie on June 23, 2021, 04:12:59 PM
Close Visual Studio
Using File Explorer, browse to the resx file
Right click the file and select Properties
Set the Unblock box and click OK
The re-open the solution
Title: Re: SelectorSwitch causes compile error
Post by: martinav on June 23, 2021, 04:28:54 PM
Close Visual Studio
Using File Explorer, browse to the resx file
Right click the file and select Properties
Set the Unblock box and click OK
The re-open the solution

What you are asking me to do is very clear.  However, I'm faced with the issue of no block box.  Nowhere in the tabs do I see this, nor have I ever seen it in file props.  What am I missing?

--Updated--
For the record, Unblock is available for a .vb file.  Do I need to associate this datatype to vb??
Title: Re: SelectorSwitch causes compile error
Post by: Archie on June 23, 2021, 04:39:03 PM
It must no longer be blocked. If you close VS and re-open, then rebuild , is the error still there?
Title: Re: SelectorSwitch causes compile error
Post by: martinav on June 23, 2021, 06:35:41 PM
Actually, I unblocked the mainform.vb file, and that got it working.