How can I make sure that my applicaiton User Interface is not influenced by Windows UI settings? What changes should I do to my application in order to prevent it?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
I don’t have an exact answer for you. Only suggestions, also because I use Delphi and have no experience using winforms.
It’s gonna be a challenge to find all areas affected by Windows UI settings. And it’s gonna be a challenge because most development environments go out of their way to make it easy for you to follow the UI settings in your apps instead of overruling/ignoring (changes to) them.
At the very least you will have to:
WM_WININICHANGE,WM_SETTINGCHANGE,WM_FONTCHANGEandWM_THEMECHANGED, but there might be more. In Delphi I would get some mileage on this by settingApplication.UpdateFormatSettingsandApplication.UpdateMetricSettingsto False, which would ensure that the application doesn’t change any of those settings when it receives a WM_WININICHANGE message. I guess there may be a similare ploy for WinForms apps, but you’d still have to deal with (or rather ignore) the other messages.clWindowText) which aren’t really constants but special values that tell the IDE/Compiler/library to pick up the values from the Windows’ settings. And you will have to take the same approach with everything that is normally controlled via Windows’ settings.In the end, I don’t think its worth the effort, and, as I already mentioned in my comment to your question, users won’t thank you for doing this. While I understand that this is a request by your customer, you may want to think about going back to that customer and convincing them it is not such a good idea.