The theme feature has a few limitations:
-
The response window cannot be resized; as a workaround you can use the Windows API (SetWindowLong) to resize the response window. However, if UI theme is applied, the response window will not be resized even if the Windows API (SetWindowLong) is called.
-
If you have applied a theme to the application, you should not check the "Enable Windows Classic Style in the IDE" option in the System Options or the "Windows classic style" option in the project painter and the PB.INI file (if any) should not contain such setting, otherwise, the application UI will be rendered in the Windows classic style instead of the selected theme.
-
Window or message box created via the MessageBox PowerScript function uses the system's default dialog styling, and does not support the UI theme applied by the application. To workaround this limitation, you can define a global function to create the message box (instead of using the MessageBox PowerScript function). Here is a code example of using the global function to create the message box:
global type messagebox from function_object end type forward prototypes global function integer messagebox (string as_title, string as_text, icon aico_icon, button abut_button, integer ai_default) global function integer messagebox (string as_title, string as_text, icon aico_icon, button abut_button) global function integer messagebox (string as_title, string as_text, icon aico_icon) global function integer messagebox (string as_title, string as_text) end prototypes global function integer messagebox (string as_title, string as_text, icon aico_icon, button abut_button, integer ai_default); // code to display window goes here end function global function integer messagebox (string as_title, string as_text, icon aico_icon, button abut_button) return messagebox( as_Title, as_Text, aico_icon, abut_button, 1 ) end function global function integer messagebox (string as_title, string as_text, icon aico_icon) return messagebox( as_Title, as_Text, aico_icon, OK!, 1 ) end function global function integer messagebox (string as_title, string as_text) return messagebox( as_Title, as_Text, Information!, OK!, 1 ) end function


