Статьи по Delphi (026)…
Как отключать стили XP для отдельных контролов?
| Как отключать стили XP для отдельных контролов? |
Темы должны быть включены и манифест лежать на форме:
Code: Unit Unit1; {©Drkb v.3(2007): www.drkb.ru}. Interface. Uses. Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, Dialogs, ExtCtrls, StdCtrls, ComCtrls, XPMan; Type. TForm1 = class(TForm). Button1: TButton; Button2: TButton; Button3: TButton; Button4: TButton; Button5: TButton; XPManifest1: TXPManifest; Procedure FormCreate(Sender: TObject); Private. Procedure Unload2Themes(var M:TMSG); message WM_USER+1; Public. { Public declarations }. End; Var. Form1: TForm1; Implementation. {$R *.dfm}. Function SetWindowTheme(hwnd: HWND; pszSubAppName: LPCWSTR; PszSubIdList: LPCWSTR): HRESULT; stdcall; external 'uxtheme.dll'; Procedure TForm1.Unload2Themes(var M: TMSG); Begin. SetWindowTheme(Button4.Handle, ' ', ' '); SetWindowTheme(Button5.Handle, ' ', ' '); SetWindowTheme(Form1.Handle, ' ', ' '); End; Procedure TForm1.FormCreate(Sender: TObject); Begin. PostMessage(Handle,WM_USER+1,0,0). End; End.
Автор: Krid.
Взято из http://forum.sources.ru.
©Drkb::00402.
- 1.
- 2.
- 3.
- 4.
- 5.
- 6.
- 7.
- 8.
- 9.
- 10.
- 11.
- 12.
- 13.
- 14.
- 15.
- 16.
- 17.
- 18.
- 19.
- 20.
- 21.
- 22.
- 23.
- 24.
- 25.
- 26.
- 27.
- 28.
- 29.
- 30.
- 31.
- 32.
- 33.
- 34.
- 35.
- 36.
- 37.
- 38.
- 39.
- 40.
- 41.
- 42.
- 43.
- 44.
- 45.
- 46.
- 47.
- 48.
- 49.
- 50.
- 51.
- 52.
- 53.
- 54.
- 55.
- 56.
- 57.
- 58.
- 59.
- 60.
- 61.
- 62.
- 63.
- 64.
- 65.
- 66.
- 67.
- 68.
- 69.
- 70.
- 71.
- 72.
- 73.
- 74.
- 75.
- 76.
- 77.
- 78.