在空窗体上放一个TButton,一个TPanel,然后把在TWinControl.WMEraseBkgnd里下断点: procedure TWinControl.WMEraseBkgnd(var Message: TWMEraseBkgnd); begin with ThemeServices do // 这里下断点 if ThemesEnabled and Assigned(Parent) and (csParentBackground in FControlStyle) then begin