I have done a small application to illustrate what I meant with "changing the internal directory of windows".
See the attached Zip.
1) Rename the shared folder of your Appeon powerbuilder installation(s) to something else temporarily for this test.
2) unzip the attachment somewhere
3) run the genapp.exe (so not from the powerbuilder IDE)
4) click on "Switch Theme" repeatedly, it'll cycle through the four standard themes.
5) click on "Do something that changes windows' internal directory"
6) click on "switch theme" again. It has stopped working because the operation on any other directory like reading or writing files, Dirlist() etc. has changed the current directory and the relative path to the folder with themes no longer works.
7) click on "set the current directory back to what it was ....
8) click on "swith theme" it should work again.
(by the way, I've assumed you have a C: drive, for the DirList() command to work)
Hope it helps
regards
Thank you so much for your suggestion! I have managed to resolve my problem based on your solution of adding pbjson.dll and pbtheme190.dll. Thank you so much!!!