Need to disable the themes in order to control the default appearance and this can be done by using SetWindowTheme API for an entire dialog or for an individual control. Once theme is disabled for progress control, you can use PBM_SETBKCOLOR and PBM_SETBARCOLOR to change color values.
prototype UxTheme.SetWindowTheme(HWND, string, string);
#define PBM_SETBKCOLOR (0x2001)
#define PBM_SETPOS (WM_USER+2)
#define PBM_STEPIT (WM_USER+5)
#define PBM_SETBARCOLOR (WM_USER+9)
hDlg = GetDlgItem(CmdGetHwndDlg(szDlg), ctrl_progress);
hDlg = GetDlgItem(CmdGetHwndDlg(szDlg), ctrl_progress);
UxTheme.SetWindowTheme(hDlg, "", "");
SendMessage(hDlg, PBM_SETBARCOLOR, 0, RGB(255,0,0));
SendMessage(hDlg, PBM_SETBKCOLOR, 0, RGB(180,180,180));
SendMessage(hDlg, PBM_SETPOS, 10, 0);
for nIndex = 10 to 120 step 10
SendMessage(hDlg, PBM_STEPIT, 0, 0); Delay(1);
endfor;
Visual appearance of dialog controls is controlled by Windows Themes and it is not recommended to change it as appearance will not be consistent with other dialogs.
Related Articles
Unable to Change the Font Used for the Cancel Installation Dialog 4Number of Views InstallScript MSI Progress Dialog Status Text Overlap 4Number of Views Hiding the Cancel button on the MSI Progress Dialog 4Number of Views How to change the default position of Installscript dialogs 3Number of Views How to Show a Progress Bar in the Dialog 3Number of Views
Hi, I am Reva - Ask me anything.
No new updates
Thanks for the feedback!
Your feedback has been saved.Rate this response:
Add Additional feedback ( Optional )
Are you sure you want to cancel
the case creation?
Are you sure you want to cancel the case creation?
Are you sure you want to close this case
| Products | Region | Phone Numbers |
|---|---|---|
| FlexNet Operations FlexNet Embedded FlexNet Publisher FlexNet Connect FlexNet Code Insight InstallAnywhere InstallShield |
North America * |
+1 630-332-2513 (toll) +1 877-279-2853 (toll-free in North America) |
| Europe * |
+44 1925 944367 (toll) +44 800 047 8642 (toll-free in Europe) |
|
| Japan * | +81 3-4540-5335 (select option 2) | |
| Australia * |
+61 3 9895 2177 +61 1800 560 603 (toll-free in Australia) |
|
|
Usage Intelligence (formerly
Revulytics) Compliance Intelligence |
Please use the Case Portal to submit your support ticket or reach out to your Revenera contact. | |
Case id: 00001065
Activity: Status change: 2 hours ago