1. Kari Paukku
  2. PowerBuilder
  3. Tuesday, 18 June 2019 06:55 AM UTC

Hi,

I'm using PB2019, buld 2082 and having issues with ApplyTheme not applying the theme is certain environments.

Made a simple test.

1) copied the themes to C:\TEMP\themes and into that, the four theme folders provided by Appeon, e.g Flat Design Blue 

2) Made a button that call the ApplyTime function as follows

int rc
String s

rc = ApplyTheme("C:\temp\themes\Flat Design Blue")
messagebox("rc", rc)

s = GetTheme()
messagebox("Theme is", s)

Under Win10 Pro it works ok, return value is 1 and theme name is Flat Design Blue

Under Win 10 Ent and Windosw 2012R2 (which acts as a Terminal Server)the same code returns -1 and no template name.

I did read that the older Windows Servers dont support themes, but what about  Win 10 Entprise and Windosw 2012R2 ?

Thanks,

ktp

 

 

 

 

Accepted Answer
Ken Guo @Appeon Accepted Answer Pending Moderation
  1. Wednesday, 19 June 2019 03:47 AM UTC
  2. PowerBuilder
  3. # Permalink

Hi Kari,

Windows 10 Enterprise and Windows 2012 R2 both support the New UI Theme feature.
We suggest that you check the following:
1. Make sure your application runs correctly with the ApplyTheme function on PB IDE. And we also suggest that you use relative path for ApplyTheme, such as ApplyTheme(‘Flat Design Blue’).
2. Deploy your application as exe on PB IDE. Make sure not to check ‘Windows Classic Style’ for your project object.
3. Copy Theme190 folder to the folder where you put your application exe file.
4. If the Windows system theme is set to "Windows Classic", then the application UI will be rendered in the Windows Classic theme instead of the selected theme.
5. If the scaling percentage is set to 125% or lower, the "Use Windows XP style DPI scaling" option will be automatically selected, which will prevent the selected theme working correctly. In such case (125% or lower), you should manually uncheck the "Use Windows XP style DPI scaling" option.

Regards,
Ken

Comment
There are no comments made yet.
Chris Pollach @Appeon Accepted Answer Pending Moderation
  1. Tuesday, 18 June 2019 16:47 PM UTC
  2. PowerBuilder
  3. # 1

Hi Kari;

  All themes must reside in the folder "Themes190". This sub-folder is located in the "C:\Program Files (x86)\Appeon\Shared\PowerBuilder" (or wherever you directed to the PB2019 installation to).

  Note that the Theme190 folder must then also be copied to where you deploy your PB App(s). Also, the name of this folder should never be changed!

HTH

Regards ... Chris

Comment
  1. Kari Paukku
  2. Tuesday, 18 June 2019 17:55 PM UTC
Hi Chris

and thank you for your reply.



Attached is pdf file with a screenshot of the pc (WIn Ent) the test application is applied.

However, the ApplyTheme still reruns -1



In the doc.pdf file is an extract of the documentation that I understood to allow to specify the path in the ApplyTheme command.



Below are two different ways to do this - none worked. In these tests the Themes190 folder was both in C-program fol

and in the folder where the application executabe (.exe) is.



1)

int rc

String s



rc = ApplyTheme("Flat Design Blue")

messagebox("rc", rc)



2)

int rc

String s



rc = ApplyTheme("C:\Program Files (x86)\Appeon\Shared\PowerBuilder\Themes190\Flat Design Blue")

messagebox("rc", rc)



What else could I try to find out why the ApplyTheme fails and why?



Thanks

ktp
  1. Helpful
  1. Chris Pollach @Appeon
  2. Tuesday, 18 June 2019 18:42 PM UTC
Yes, If you hard code the full path it should work no matter what you named the folder or where its located.

I am not sure if W2012 supports themes.

NOTE: Themes will not work if you have "Windows Classic Style" feature turned ON in the PB IDE or use this setting when building your App EXE's from the Project Painter.



  1. Helpful
There are no comments made yet.
Kari Paukku Accepted Answer Pending Moderation
  1. Tuesday, 18 June 2019 22:01 PM UTC
  2. PowerBuilder
  3. # 2

Hi,

no, I dont have the "Windows Classic Style" checked.

As it works on Win 10 Pro, I'm just wondering how operating system depended the feature is? Would like to think that Win 10 Ent is just another version (with more features) of Windows. If it doesn work on Windows Servers' it takes out all terminal server installations.  If it doesnt support Win 10 Ent, then that limits also quite a lot of installations.

Have entered this question to Appeon support

ktp

 

 

Comment
There are no comments made yet.
Kari Paukku Accepted Answer Pending Moderation
  1. Wednesday, 19 June 2019 12:28 PM UTC
  2. PowerBuilder
  3. # 3

Hi,


the problem turned out to be two missing runtime files when implemented outside the development environment. For the record, the files were pbjson190.dll and pbtheme190.dll.

Including those made the themes appear and work correctly both in Win 10 Ent and Win2012R2 environment.

A big thanks to Appeon's support team - without their help, I probably wouldn't have solved this as I wouldn't have realised that I'm missing files for the runtime environment. The application is quite large and as it works ok, it didn't even occur to me that the issue might be with the runtime files.

 
Kari

 

Comment
There are no comments made yet.
  • Page :
  • 1


There are no replies made for this question yet.
However, you are not allowed to reply to this question.