- Robert Carlson
- PowerBuilder
- Monday, 9 January 2023 10:20 PM UTC
Hello all.
We recently updated our software to use the new PB UI themes. Our customers haven't had any problems with this working in production, except for one group of customers who are using Windows Server 2016 to host , and RDS to connect to the application. We have several other customers who are using a similar setup with Windows Server 2012, and have not experienced any issues. Things we have tried.
1. We have made sure that the 'Windows Classic' setting was not set on the server
2. The path to the 'themes' folder is correct. It is located as a sub-folder in the application directory.
3. We have tried different ways to access themes using the ApplyTheme function. Absolute path, relative path, or just the theme name.
4. The pbtheme.dll and pbjson.dll are in the application directory as well.
5. Double checked Windows security permissions on the 'themes' folder. Doesn't work even if 'Full Control' is selected.
6. Tried moving the 'themes' folder somewhere else on the machine and calling the ApplyTheme function using the absolute path.
No matter what we try, the ApplyTheme function always returns -1 in this environment. The same exact code, with the same exact install (we literally copy pasted the program files folder from one machine to the other), returns 1 in other environments, and -1 in this Windows Server 2016 environment. We are not sure what else to try. Please help!
Some more details:
We are using PB 2019 R3 Build 2703 to create the application.
Here is some code I have tried using to debug this.
string ls_error, ls_path
ls_path = "C:\Program Files\SMART Systems\SMART\themes\Flat Design eR" // Path to the themes folder
MessageBox("Theme Path", ls_path)
MessageBox("Path Exists", FileExists(ls_path)) // Returns TRUE
MessageBox("Apply Theme 1", string(ApplyTheme(ls_path))) // Returns -1
MessageBox("Apply Theme 2", string(ApplyTheme("Flat Design eR"))) // Returns -1
Find Questions by Tag
Helpful?
If a reply or comment is helpful for you, please don’t hesitate to click the Helpful button. This action is further confirmation of their invaluable contribution to the Appeon Community.