I am having issues trying to get a background image and imagebox to work on the virtual teachpendant. I’m using C# 2005 and RW5.10.2. Below is the code for the imagebox:
Is this code written by you or by the designer? You can put this code inside a try/catch block to see the exception, or just attach the debugger and step through the code as descibed in the help to see where you code is breaking. Are you using the same version of RAB as RW? You need to make sure both are of the same major version.
you can see that there is a local variable called resources. In order to check the data declaration of this variable, you can right-click and select “Go To Definition”. Here you will see the data type:
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(YOUR_TPS_VIEW_NAME));
Change the declaration of this variable to be TpsResourceManager and try again. Sample Code:
ABB.Robotics.Tps.Resources.TpsResourceManager resources = new ABB.Robotics.Tps.Resources.TpsResourceManager();
Try to load your application. In case this does not work, we have two options:
Option A) Instead of “compressing” the image file inside your application, we could have it outside in a jpg of bmp file (Russ proposal). In order to do this, leave the new declaration of the local variable resources, copy the image file inside the home folder and change the way the image is loaded inside the picture box:
Option B). We still include your images in your application DLL. IN order to do this, we just need to load the image inside the Visual Studio in a different way.
This is not as complicated as it sounds. We should just go step by step :).