1. Sanjay Shivade
  2. PowerBuilder
  3. Thursday, 26 September 2019 19:00 PM UTC

Hi,

None of these functions return Success in our environment from executables (i have commented these lines before posting here). Am I missing something here? I have tried everything but nothing helped. Everything works fine from development though. Thanks!

// int li_Test

// MessageBox("GetCurrentDirectory( )", GetCurrentDirectory( ))

// li_Test = ApplyTheme (".\themes190\Flat Design Blue")
// MessageBox("First",li_Test)
// li_Test = ApplyTheme (".\..\themes190\Flat Design Blue")
// MessageBox("Second",li_Test)
// li_Test = ApplyTheme ("themes190\Flat Design Blue")
// MessageBox("Third",li_Test)
// li_Test = ApplyTheme ("themes190\Flat Design Blue")
// MessageBox("Third",li_Test)

// li_Test = ApplyTheme ("theme190\Flat Design Blue")
// MessageBox("Fourth",li_Test)

// li_Test = ApplyTheme ("themes190\Flat Design Blue")
// MessageBox("Fifth",li_Test)

// li_Test = ApplyTheme ("Flat Design Blue")
// MessageBox("Sixth",li_Test)

// li_Test = ApplyTheme (GetCurrentDirectory( )+"\Flat Design Blue")
// MessageBox("VII",li_Test)

// li_Test = ApplyTheme ("E:\PowerAgent\PowerBuilder Upgrade\PA19.0MainSP01\themes190\Flat Design Blue")
// MessageBox("E:\PowerAgent\PowerBuilder Upgrade\PA19.0MainSP01\themes190\Flat Design Blue",li_Test)

Sanjay Shivade Accepted Answer Pending Moderation
  1. Friday, 4 October 2019 16:10 PM UTC
  2. PowerBuilder
  3. # 1

This is now resolved. The issue was Themes built using 32-bit executables don't work in 64-bit environments. We had rebuild all our executables as 64-bit then themes started to work the development environment.

Client environment analysis is pending.

 

Thanks!

Comment
  1. Sanjay Shivade
  2. Monday, 7 October 2019 17:26 PM UTC
Could you let me know which files are "32bit theme files"? Thanks
  1. Helpful
  1. Chris Pollach @Appeon
  2. Monday, 7 October 2019 17:37 PM UTC
Hi Sanjay .. "Theme" files are just JSON based that also use various small image files. Thus, they are not bit sensitive. The run-time support module for the above though (PBTHEME190.dll) does come in both a 32bit & 64bit flavour. So that has to match the bitness of your PB App(s) EXEs.
  1. Helpful
  1. Sanjay Shivade
  2. Monday, 7 October 2019 18:03 PM UTC
Hi Chris,



I just confirmed we do have 32-bit pbtheme190.dll in \32bit executables and 64-bit pbtheme190.dll in \64-bit executables.



As the 32-bit and 64-bit runtimes were created using pbpack190.exe utility that automatically included pbtheme190.dll with appropriate versions.



Thoughts?

Sanjay

  1. Helpful
There are no comments made yet.
Miguel Leeuwe Accepted Answer Pending Moderation
  1. Saturday, 28 September 2019 07:19 AM UTC
  2. PowerBuilder
  3. # 2

Hi Sanjay, 

One last thing: Can you show us all of the code of your application's Open event?

 

Comment
  1. Sanjay Shivade
  2. Tuesday, 1 October 2019 17:13 PM UTC
Here you go:



theGlobals = create n_ApplicationGlobals

theGlobals.SetApplicationVersion("Security Manager V3.5", "")

n_Security_Manager = create n_Security_Manager

n_externalfunctions = create n_externalfunctions

n_app_Security = create n_app_Security // contains security functions for app

n_app = create n_app



//apply theme PB 2019 Upgrade change

//C:\Program Files (x86)\Appeon\Shared\PowerBuilder\theme190\Flat Design Dark

//ApplyTheme ("C:\Program Files (x86)\Appeon\Shared\PowerBuilder\theme190\Flat Design Blue")

//ApplyTheme ("C:\Program Files (x86)\Appeon\Shared\PowerBuilder\theme190\Flat Design Silver")

//ApplyTheme ("C:\Program Files (x86)\Appeon\Shared\PowerBuilder\theme190\Flat Design Dark")

//ApplyTheme ("C:\Program Files (x86)\Appeon\Shared\PowerBuilder\theme190\Flat Design Grey")



// Nothing works

// int li_Test

//

// MessageBox("GetCurrentDirectory( )", GetCurrentDirectory( ))

//

// li_Test = ApplyTheme (".\themes190\Flat Design Blue")

// MessageBox("First",li_Test)

// li_Test = ApplyTheme (".\..\themes190\Flat Design Blue")

// MessageBox("Second",li_Test)

// li_Test = ApplyTheme ("themes190\Flat Design Blue")

// MessageBox("Third",li_Test)

// li_Test = ApplyTheme ("themes190\Flat Design Blue")

// MessageBox("Third",li_Test)

//

// li_Test = ApplyTheme ("theme190\Flat Design Blue")

// MessageBox("Fourth",li_Test)

//

// li_Test = ApplyTheme ("themes190\Flat Design Blue")

// MessageBox("Fifth",li_Test)

//

// li_Test = ApplyTheme ("Flat Design Blue")

// MessageBox("Sixth",li_Test)

//

// li_Test = ApplyTheme (GetCurrentDirectory( )+"\Flat Design Blue")

// MessageBox("VII",li_Test)

//

// li_Test = ApplyTheme ("E:\app\PowerBuilder Upgrade\PA19.0MainSP01\themes190\Flat Design Blue")

// MessageBox("E:\app\PowerBuilder Upgrade\PA19.0MainSP01\themes190\Flat Design Blue",li_Test)



String themeinifilename, ls_Theme



themeinifilename = "themes.ini"



ls_Theme = ProfileString(themeinifilename,"Theme Settings","Theme"," ")

ApplyTheme (ls_Theme)



Open(w_splash_app)

This.DWMessageTitle="app Message"

theGlobals.ObjectStart(this,"w_appframe_secman")
  1. Helpful
  1. Miguel Leeuwe
  2. Tuesday, 1 October 2019 22:46 PM UTC
Thanks, can you paste the contents of your ini file?

  1. Helpful
There are no comments made yet.
Miguel Leeuwe Accepted Answer Pending Moderation
  1. Saturday, 28 September 2019 07:12 AM UTC
  2. PowerBuilder
  3. # 3

Test2.zip had a little mistake which Chris kindly corrected.

Here's the corrected version attached.

 

Cheers.

 

Attachments (1)
Comment
There are no comments made yet.
Miguel Leeuwe Accepted Answer Pending Moderation
  1. Friday, 27 September 2019 23:44 PM UTC
  2. PowerBuilder
  3. # 4

Well that bug was bombed right away by Chris :)

I made a stupid mistake of distinguishing for running from the IDE or EXE and then the subpath was non-existing.

(due to having used this test app on powerserver, and yes ... I know lousy excuse).

 

Sorry to wasting time for you. There's no apparent bug.

Chris even says he used a manifest, and it still works.

Sanjay, I guess this is as much as I can do.

 

Comment
  1. Miguel Leeuwe
  2. Saturday, 28 September 2019 00:08 AM UTC
Maybe you can request Appeon to connect remotely with you and see what's going on exactly.
  1. Helpful
There are no comments made yet.
Miguel Leeuwe Accepted Answer Pending Moderation
  1. Friday, 27 September 2019 22:17 PM UTC
  2. PowerBuilder
  3. # 5

I've reported this as a possible bug 3406

(but later turned out it's not. It's a mistake in my code, as I used it for other things and wasn't aware of a change I made).

Comment
There are no comments made yet.
Miguel Leeuwe Accepted Answer Pending Moderation
  1. Friday, 27 September 2019 22:10 PM UTC
  2. PowerBuilder
  3. # 6

This is the weirdest thing:

 blablabla ... (Edited to avoid people trying what was here. Turns out I had a little mistake in the code)

 

...

Deleted

Comment
There are no comments made yet.
Roland Smith Accepted Answer Pending Moderation
  1. Friday, 27 September 2019 20:49 PM UTC
  2. PowerBuilder
  3. # 7

pbjson190.dll and pbtheme190.dll must be in the runtime folder.

Comment
  1. Sanjay Shivade
  2. Friday, 27 September 2019 21:04 PM UTC
I do have both pbjson190.dll and pbtheme190.dll in runtime folder.
  1. Helpful
  1. Chris Pollach @Appeon
  2. Monday, 30 September 2019 13:40 PM UTC
Those two DLL's only affect performance and not Theme functionality. By adding these two DLL's to the PB App EXE's folder, the App will just run a little faster.
  1. Helpful
There are no comments made yet.
Miguel Leeuwe Accepted Answer Pending Moderation
  1. Friday, 27 September 2019 20:46 PM UTC
  2. PowerBuilder
  3. # 8

Hi

Did you try to run this test application?

https://community.appeon.com/index.php/qna/q-a?controller=attachment&task=download&tmpl=component&id=476

  • Unzip it and run "genapp.exe".
  • Then you'll see a button which says "Switch Theme", see if that one works or not. (it should).

 

Comment
  1. Sanjay Shivade
  2. Friday, 27 September 2019 21:04 PM UTC
I thought I already replied to this.



Yes this test app works fine. The change directory however has no effect in our environment. The app works with our without directory change. genapp.exe works fine our environment but not our app eventhough we have ApplyTheme function call right in App's open event.

  1. Helpful
  1. Miguel Leeuwe
  2. Friday, 27 September 2019 21:18 PM UTC
Okay, the Change Directory button. That was only to try and see if changing the default directory could cause the change of themes to stop working. It didn't stop things from working, strangely enough.

So what's different between the test app and yours? It's not your PC's configuration.

Can you export the project object which you use to build your executable?
  1. Helpful
There are no comments made yet.
Chris Pollach @Appeon Accepted Answer Pending Moderation
  1. Friday, 27 September 2019 16:18 PM UTC
  2. PowerBuilder
  3. # 9

Hi Sanjay;

  Did you check Miguel's link?

Basically ...

  • The following options in PowerBuilder IDE or the Windows operating system may prevent the selected theme working correctly:

    The "Windows classic style" option in the PowerBuilder Project painter

    When you build the application in the Project painter, you should not check the "Windows classic style" option. If "Windows classic style" is selected, the application UI will be rendered in the Windows classic style instead of the selected theme.

    The "Windows Classic" theme in the Windows operating system

    When the application is run in the Windows system and 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.

    The "Use Windows XP style DPI scaling" option in Windows 7, Windows Server 2012, or earlier

    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 ... Chris

Comment
  1. Sanjay Shivade
  2. Friday, 27 September 2019 16:26 PM UTC
The "Windows classic style" option in the PowerBuilder Project painter - is unchecked

The "Windows Classic" theme in the Windows operating system - is custom

The "Use Windows XP style DPI scaling" option in Windows 7, Windows Server 2012, or earlier - I have Windows 10 enterprise as a client and server has Windows 2016. Could you let me know where exactly "Use Windows XP style DPI scaling" option is located?



Thanks!
  1. Helpful
There are no comments made yet.
Miguel Leeuwe Accepted Answer Pending Moderation
  1. Friday, 27 September 2019 04:44 AM UTC
  2. PowerBuilder
  3. # 10

Hi, 

Have a look at https://community.appeon.com/index.php/qna/q-a/appeon-theme190-not-working-after-deployment

I've attached two little test applications on that link: try to see what happens with "test2.zip".

HIH

Comment
  1. Michael Kramer
  2. Friday, 27 September 2019 08:34 AM UTC
Great info. THX!

Feels like I was going down a rabbit hole instead of searching for similar prior threads. /M
  1. Helpful
  1. Miguel Leeuwe
  2. Friday, 27 September 2019 09:06 AM UTC
Ha, I only remembered because I remembered I commented. To be true, I tried so find it by searching on "Theme" but couldn't find it. had to scroll back through all the pages to find it. That could be me though not knowing how to search properly. :)
  1. Helpful
  1. Miguel Leeuwe
  2. Saturday, 28 September 2019 07:16 AM UTC
(Edit: Don't use test2.zip, but use test2-corrected.zip)
  1. Helpful
There are no comments made yet.
Sanjay Shivade Accepted Answer Pending Moderation
  1. Thursday, 26 September 2019 21:01 PM UTC
  2. PowerBuilder
  3. # 11

I have everything as you stated above but still the problem persists.

I do not both pbjson and pbtheme 64-bit (also tried with 32-bit dlls) in executables folder.  Thoughts?

Comment
  1. Sanjay Shivade
  2. Thursday, 26 September 2019 21:53 PM UTC
Q1. I will.



Q2. Following lines do not work my environment at runtime.





li_Test = ApplyTheme (".\themes190\Flat Design Blue")

MessageBox("First",li_Test)

li_Test = ApplyTheme (".\..\themes190\Flat Design Blue")

MessageBox("Second",li_Test)

li_Test = ApplyTheme ("themes190\Flat Design Blue")

MessageBox("Third",li_Test)

li_Test = ApplyTheme ("themes190\Flat Design Blue")

MessageBox("Third",li_Test)



li_Test = ApplyTheme ("theme190\Flat Design Blue")

MessageBox("Fourth",li_Test)



li_Test = ApplyTheme ("themes190\Flat Design Blue")

MessageBox("Fifth",li_Test)



li_Test = ApplyTheme ("Flat Design Blue")

MessageBox("Sixth",li_Test)



li_Test = ApplyTheme (GetCurrentDirectory( )+"\Flat Design Blue")

MessageBox("VII",li_Test)



li_Test = ApplyTheme ("E:\PowerBuilder Upgrade\PA19.0MainSP01\themes190\Flat Design Blue")

MessageBox("E:\PowerBuilder Upgrade\PA19.0MainSP01\themes190\Flat Design Blue",li_Test)
  1. Helpful
  1. Michael Kramer
  2. Thursday, 26 September 2019 23:42 PM UTC
Hi Sanjay, It is the code with message = "Sixth" that interests me.

STEP A :: If you ONLY do that ApplyTheme (comment out ALL other ApplyTheme) - then what is li_test value you see in that message box?

STEP B :: What is the path to subfolder containing Flat Design Blue theme ?

Say your .EXE file is "E:\MY-DIR\myapp.exe" - is path to "blue" JSON file then "E:\MY-DIR\theme190\Flat Blue Design\theme.json"?

I believe some file/folder is missing/misplaced/misnamed. Problem is to narrow down which + where.

CET 01:40 so I'm off for the night here in Europe.
  1. Helpful
  1. Sanjay Shivade
  2. Friday, 27 September 2019 15:57 PM UTC
Hi Michael,



STEP A: Returns -1 from deployed version. From development version returns 1.

STEP B: E:\MY-DIR\theme190\Flat Blue Design\theme.json - Yes this is the path



I agree with you something is missing but what is that?



Thanks!
  1. Helpful
There are no comments made yet.
Sanjay Shivade Accepted Answer Pending Moderation
  1. Thursday, 26 September 2019 20:59 PM UTC
  2. PowerBuilder
  3. # 12

Yes I do have Themes190 and Theme190 folders in my deployed app folder. Thanks!

Comment
There are no comments made yet.
Michael Kramer Accepted Answer Pending Moderation
  1. Thursday, 26 September 2019 20:47 PM UTC
  2. PowerBuilder
  3. # 13

Hi Sanjay,

I have PB 2019 deployed app configured as follows where code can "theme up" and "theme down" (remove theming).

Folder Content
C:\PB2019\MicK-Map mickmap.exe; *.pbd
C:\PB2019\MicK-Map\theme190\Flat Design Blue theme.json; *.bmp; *.ico; ...
C:\PB2019\MicK-Map\theme190\No Theme theme.json

Code to enable themes respectively:

// function of_EnableTheme()
ApplyTheme ("Flat Design Blue")

// function of_DisableTheme()
ApplyTheme ("No Theme")

NOTES:

  • Space char between words "Flat-space-Design-space-Blue"
  • However, no spaces in theme folder "theme190"
  • My "No Theme" is a theme that disables theme for every control type 
{
   "meta-info": {"version":"190"},
   "checkbox": {"drawing":false},
   "commandbutton": {"drawing":false},
   "datawindow": {"drawing":false},
   . . .
}

 

My next question if similar doesn't work for you: Did you deploy the theme runtime DLLs?

  • pbtheme190.dll
  • pbjson190.dll

HTH /Michael

Comment
There are no comments made yet.
Chris Pollach @Appeon Accepted Answer Pending Moderation
  1. Thursday, 26 September 2019 20:44 PM UTC
  2. PowerBuilder
  3. # 14

Hi Sanjay;

   It should work more flexibly and easier by ...

1) Drop the path to each Theme.

    ie:  ApplyTheme ("Flat Design Blue")

2) Copy the Theme190 folder from your Development environment under the "C:\Program Files (x86)\Appeon\Shared\PowerBuilder" folder to your App EXE folder as a sub-folder of the APP's main folder.

HTH

Regards ... Chris

Comment
There are no comments made yet.
Sanjay Shivade Accepted Answer Pending Moderation
  1. Thursday, 26 September 2019 20:11 PM UTC
  2. PowerBuilder
  3. # 15

Hi,

 

I have tried the following:

 

ExecutablesFolder\Flat Design Blue

ExecutablesFolder\theme190\Flat Design Blue

ExecutablesFolder\themes190\Flat Design Blue

 

My executable is located in executablesfolder. 

 

Thanks!

 

 

 

 

Comment
  1. Chris Pollach @Appeon
  2. Thursday, 26 September 2019 21:07 PM UTC
1) No Path

2) Make sure that you deploy the PB run-time via the PB Packager utility's MSI
  1. Helpful
  1. Sanjay Shivade
  2. Thursday, 26 September 2019 21:13 PM UTC
Could you let me know where in PB 2019 Packager Utility is located or any info pertaining to PB Packager utility?



Thanks!
  1. Helpful
There are no comments made yet.
Michael Kramer Accepted Answer Pending Moderation
  1. Thursday, 26 September 2019 19:40 PM UTC
  2. PowerBuilder
  3. # 16

Hi, did you deploy the Themes190 folder alongside your deployed app?

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.