www.pudn.com > ChaoJiQiDong.rar > u_CommonSetDlg.pas, change:2009-11-14,size:2054b


unit u_CommonSetDlg; 
 
interface 
 
uses 
  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, 
  Dialogs, ComCtrls, Buttons, StdCtrls,mxOutlookBarPro; 
 
type 
  TForm3 = class(TForm) 
    PageControl1: TPageControl; 
    TabSheet1: TTabSheet; 
    GroupBox1: TGroupBox; 
    RadioButton1: TRadioButton; 
    RadioButton2: TRadioButton; 
    BitBtn1: TBitBtn; 
    BitBtn2: TBitBtn; 
    GroupBox2: TGroupBox; 
    CheckBox1: TCheckBox; 
    CheckBox2: TCheckBox; 
    GroupBox3: TGroupBox; 
    RadioButton3: TRadioButton; 
    RadioButton4: TRadioButton; 
    GroupBox4: TGroupBox; 
    CheckBox3: TCheckBox; 
    procedure FormClose(Sender: TObject; var Action: TCloseAction); 
    procedure RadioButton1Click(Sender: TObject); 
    procedure RadioButton2Click(Sender: TObject); 
    procedure CheckBox3Click(Sender: TObject); 
  private 
    { Private declarations } 
  public 
    { Public declarations } 
  end; 
 
var 
  Form3: TForm3=NIL; 
  MyOutlookBar:TmxOutlookBarPro=NIL; 
  AcceptMusic:Boolean=TRUE; 
  Function  SetOutlookBarHeaderColor(OutlookBar:TmxOutlookBarPro;SetColor:TColor):Boolean; 
implementation 
 
{$R *.dfm} 
 
Function  SetOutlookBarHeaderColor(OutlookBar:TmxOutlookBarPro;SetColor:TColor):Boolean; 
var 
  i,HeaderNum:Integer; 
begin 
  HeaderNum:=  OutlookBar.HeaderCount; 
  if   HeaderNum=0 then exit; 
  for i:=0 to HeaderNum-1 do 
  begin 
      OutlookBar.Header[i].Background.Color := SetColor; 
      OutlookBar.Header[i].FirstButtonTop:=1; 
  end; 
end; 
 
procedure TForm3.FormClose(Sender: TObject; var Action: TCloseAction); 
begin 
    Action:=caHide; 
end; 
 
procedure TForm3.RadioButton1Click(Sender: TObject); 
begin 
  MyOutlookBar.PreSet :=psToolBox; 
  SetOutlookBarHeaderColor(MyOutlookBar,clWhite); 
end; 
 
procedure TForm3.RadioButton2Click(Sender: TObject); 
begin 
  MyOutlookBar.PreSet :=psOffice2000; 
  SetOutlookBarHeaderColor(MyOutlookBar,clWhite); 
end; 
 
procedure TForm3.CheckBox3Click(Sender: TObject); 
begin 
  AcceptMusic:= CheckBox3.Checked ; 
end; 
 
end.