简体   繁体   English

如何在Ax 2012 R3的标题栏中更改表单的颜色

[英]How to change the color of form in title bar in ax 2012 R3

I want to change the color of the Title bar/Action pane in a form but it should be applicable to all default forms in the application. 我想更改表单中“标题栏” /“操作”窗格的颜色,但它应适用于应用程序中的所有默认表单。

I tried with run method in SysSetupFormRun class. 我尝试了SysSetupFormRun类中的run方法。

You could try the .xpo provided in this thread: It changes the footer not the title bar but it may work for your issue. 您可以尝试此线程中提供的.xpo:它更改页脚而不是标题栏,但可以解决您的问题。

http://www.agermark.com/2011/12/color-code-forms-in-ax-2012-depending.html http://www.agermark.com/2011/12/color-code-forms-in-ax-2012-depending.html

BR, Kristian 克里斯蒂安·BR

I don't have ready code for you could expand the WinAPI class and do some WinAPI calls to set the title bar color. 我没有现成的代码,可以扩展WinAPI类并进行一些WinAPI调用以设置标题栏颜色。

I believe you would need the SetWindowLong function from user32.dll . 我相信您将需要user32.dllSetWindowLong函数。

Have a look at WinAPI.appendMenu() for an example on how to call into user32.dll 看一下WinAPI.appendMenu()上有关如何调用user32.dll的示例

You should probably be able to convert the code from this post: Can you change the color of the titlebar of a userform in VBA using Windows API? 您应该应该可以从这篇文章中转换代码: 您可以使用Windows API在VBA中更改用户窗体标题栏的颜色吗?

Then you should hook it into the SysSetupFormRun or FormRun class as you tried. 然后,应尝试将其挂接到SysSetupFormRun或FormRun类中。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM