Aero対応のためのMainFormOnTaskbarプロパティー注意点

Aero対応にするには,プロジェクトソースにMainFormOnTaskbar := Trueを記述する必要がある.
しかしこうするとメインフォームから表示したフォームが常にメインフォームの上に表示されてしまうので要注意.
必要に応じてTrueかFalseが選択する.実行時に変更してはいけない.
Delphi2007以降では新規アプリケーション作成時に自動的にMainFormOnTaskbar := Trueが記述される.

program Project1;

uses
  Forms,
  Unit1 in ‘Unit1.pas’ {Form1},
  Unit2 in ‘Unit2.pas’ {Form2};

{$R *.res}

begin
  {$WARN SYMBOL_PLATFORM OFF}
    //メモリーリークチェック
    ReportMemoryLeaksOnShutdown := DebugHook <> 0;
  {$WARN SYMBOL_PLATFORM ON}
  Application.Initialize;
  //これがあるとForm1がForm2の裏に隠れる
  Application.MainFormOnTaskbar := True;
  Application.CreateForm(TForm1, Form1);
  Application.CreateForm(TForm2, Form2);
  Application.Run;
end.

参考:http://docwiki.embarcadero.com/VCL/ja/Forms.TApplication.MainFormOnTaskBar (VCL Documentation)

TeeChartの使い方 軸設定

TeeChartの使い方 軸設定 (TeeChart Pro 8.06)

    With Chart1 do
    begin

        //Y軸
       LeftAxis.Title.Font.Size := 11;
       LeftAxis.Title.Caption := ‘Y-axis’;
       LeftAxis.LabelsFont.Size := 11;
       LeftAxis.AxisValuesFormat := ‘0.0##’;
       LeftAxis.Minimum := 0;
       LeftAxis.AutomaticMaximum := True;
       LeftAxis.AutomaticMinimum := False;
       //LeftAxis.Automatic := True;
       LeftAxis.Ticks.Visible := True;//目盛表示
       LeftAxis.TickLength := 5;//目盛の長さ
       LeftAxis.TicksInner.Visible := True;//内側目盛表示
       LeftAxis.TickInnerLength := 2;//内側目盛の長さ
       LeftAxis.MinorTicks.Visible := True;//副目盛表示
       LeftAxis.MinorTickLength := 3;//副目盛の長さ
       LeftAxis.Grid.Visible := True;//グリッド表示
       //目盛増加量(グリッド間隔) 小さすぎる場合は勝手に大きくなる
       LeftAxis.Increment := 0.5;
       //グリッド間隔が勝手に大きくなるのをなるべく防ぐには次のようにする
       LeftAxis.LabelsSeparation := 0;

       //第2Y軸
       RightAxis.Title.Font.Size := 11;
       RightAxis.Title.Caption := ‘2nd Y-axis’;
       RightAxis.LabelsFont.Size := 11;
       RightAxis.AxisValuesFormat := ‘0.0##’;
       RightAxis.Minimum := 0;
       RightAxis.Automatic := True;
       RightAxis.Grid.Visible := False;

       //X軸
       BottomAxis.Title.Font.Size := 11;
       BottomAxis.Title.Caption := ‘X-axis’;
       BottomAxis.LabelsFont.Size := 11;
       BottomAxis.AxisValuesFormat := ‘0’;
       BottomAxis.Automatic := True;
       BottomAxis.Grid.Visible := True;

   end;

TeeChartの使い方 凡例設定

TeeChartの使い方 凡例設定 (TeeChart Pro 8.06)

uessに TeEngineを追加

    With Chart1 do
    begin

      // 凡例————————————–
      //凡例を表示

       Legend.Visible := True;
      //位置 (laLeft, laRight, laTop, laBottom)
       Legend.Alignment := laRight;
      //カスタム位置(Trueの場合はLeft,Topで位置指定)
       Legend.CustomPosition := False;
      //背景色
       Legend.Color := clWindow;
      //文字を系列色にする
       Legend.FontSeriesColor := True;
      //行の反転
       Legend.Inverted := False;
      //凡例スタイル
      //(lsAuto:自動, lsSeries:系列名, lsValues:系列の値
      //, lsLastValues:最後の値, lsSeriesGroups:系列グループ)

       Legend.LegendStyle := lsSeries;
      //テキストスタイル
      //ltsPlain:文字列のみ, ltsLeftValue:値左側表示, ltsRightValue:値右側表示
      //, ltsLeftPercent:%左側表示, ltsRightPercent:%右側表示
      //, ltsXValue:X値, ltsValue:値, ltsPercent:%
      //, ltsXAndValue:X値と値, ltsXAndPercent:X値と%

       Legend.TextStyle := ltsPlain;
       Legend.Font.Size := 10;
      //影
       Legend.Shadow.Visible := True;
       Legend.ShadowSize := 1;
      //凡例とチャートの余白
       Legend.HorizMargin := 0;
      //チェックボックス
       Legend.CheckBoxes := False;
      //幅の自動調整
       Legend.ColumnWidthAuto := True;
      //行間隔
       Legend.VertSpacing := 0;
      //凡例タイトル
       Legend.Title.Visible := True;
       Legend.Title.Text.Clear;
       Legend.Title.Text.Add(‘Title’);
      //凡例に合わせてチャートサイズ変更
       Legend.ResizeChart := True;

   end;