在QQ群大神大悟还俗发现fpcudeluxe在windows暗黑模式使用时界面也是和windows一样,这是他提供的方法:
1、拷贝fpcudeluxe的metadarkstyle文件夹的文件到project目录(下载地址https://www.123pan.com/s/6OFxjv-JFdu3?提取码:iBiZ)
2、在project*.lpr的uses增加下图绿框的代码
program Project1; {$mode objfpc}{$H+} uses {$IFDEF UNIX} cthreads, {$ENDIF} {$IFDEF HASAMIGA} athreads, {$ENDIF} {$ifdef windows} uMetaDarkStyle, uDarkStyleSchemes, uDarkStyleParams, {$endif} Interfaces, // this includes the LCL widgetset Forms, unit1 { you can add units after this }; {$R *.res} begin {$ifdef windows} PreferredAppMode:= pamAllowDark; uMetaDarkStyle.ApplyMetaDarkStyle(DefaultDark); RequireDerivedFormResource:=True; {$endif} Application.Scaled:=True; Application.Initialize; Application.CreateForm(TForm1, Form1); Application.Run; end.
编译后的应用在windows暗黑模式:
标签:windows,模式,Application,lazarus,fpcudeluxe,暗黑,ifdef From: https://www.cnblogs.com/qiufeng2014/p/18382904