亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? tflatgroupboxunit.pas

?? vod點歌系統,DELPHI的通用軟件 會有幫助
?? PAS
字號:
unit TFlatGroupBoxUnit;

interface

{$I DFS.inc}

uses
  Windows, Messages, SysUtils, Forms, Classes, Graphics, Controls, ExtCtrls, FlatUtilitys;

type
  TFlatGroupBox = class(TCustomControl)
  private
    FTransparent: Boolean;
    FUseAdvColors: Boolean;
    FAdvColorBorder: TAdvColors;
    FBorderColor: TColor;
    FBorder: TGroupBoxBorder;
    procedure SetAdvColors (Index: Integer; Value: TAdvColors);
    procedure SetUseAdvColors (Value: Boolean);
    procedure CMEnabledChanged (var Message: TMessage); message CM_ENABLEDCHANGED;
    procedure CMTextChanged (var Message: TWmNoParams); message CM_TEXTCHANGED;
    procedure SetColors(const Index: Integer; const Value: TColor);
    procedure SetBorder(const Value: TGroupBoxBorder);
    procedure CMSysColorChange (var Message: TMessage); message CM_SYSCOLORCHANGE;
    procedure CMParentColorChanged (var Message: TWMNoParams); message CM_PARENTCOLORCHANGED;
    procedure CMDialogChar (var Message: TCMDialogChar); message CM_DIALOGCHAR;
    procedure WMSize (var Message: TWMSize); message WM_SIZE;
    procedure WMMove (var Message: TWMMove); message WM_MOVE;
    procedure SetTransparent (const Value: Boolean);
  protected
    procedure CalcAdvColors;
    procedure Paint; override;
   {$IFDEF DFS_COMPILER_4_UP}
    procedure SetBiDiMode(Value: TBiDiMode); override;
   {$ENDIF}
  public
    constructor Create (AOwner: TComponent); override;
  published
    property Transparent: Boolean read FTransparent write SetTransparent default false;
    property Align;
    property Cursor;
    property Caption;
    property Font;
    property ParentFont;
    property Color;
    property ParentColor;
    property PopupMenu;
    property ShowHint;
    property ParentShowHint;
    property Enabled;
    property Visible;
    property TabOrder;
    property TabStop;
    property Hint;
    property HelpContext;
    property ColorBorder: TColor index 0 read FBorderColor write SetColors default $008396A0;
    property Border: TGroupBoxBorder read FBorder write SetBorder default brFull;
    property AdvColorBorder: TAdvColors index 0 read FAdvColorBorder write SetAdvColors default 50;
    property UseAdvColors: Boolean read FUseAdvColors write SetUseAdvColors default false;
   {$IFDEF DFS_COMPILER_4_UP}
    property Anchors;
    property BiDiMode write SetBidiMode;
    property Constraints;
    property DragKind;
    property DragMode;
    property DragCursor;
    property ParentBiDiMode;
    property DockSite;
    property OnEndDock;
    property OnStartDock;
    property OnDockDrop;
    property OnDockOver;
    property OnGetSiteInfo;
    property OnUnDock;
   {$ENDIF}
   {$IFDEF DFS_DELPHI_5_UP}
    property OnContextPopup;
   {$ENDIF}
    property OnClick;
    property OnDblClick;
    property OnDragDrop;
    property OnDragOver;
    property OnEndDrag;
    property OnEnter;
    property OnExit;
    property OnMouseDown;
    property OnMouseMove;
    property OnMouseUp;
    property OnStartDrag;
  end;

implementation

{ TFlatGroupBox }

constructor TFlatGroupBox.Create(AOwner: TComponent);
begin
  inherited Create(AOwner);
  ControlStyle := ControlStyle + [csAcceptsControls, csOpaque];
  FBorderColor := $008396A0;
  FAdvColorBorder := 50;
  SetBounds(0, 0, 185, 105);
end;

procedure TFlatGroupBox.Paint;
var
  memoryBitmap: TBitmap;
  borderRect, textBounds: TRect;
  textHeight, textWidth: integer;
  Format: UINT;
begin
  borderRect := ClientRect;
  {$IFDEF DFS_COMPILER_4_UP}
  if BidiMode = bdRightToLeft then
    Format := DT_TOP or DT_RIGHT or DT_SINGLELINE
  else
    Format := DT_TOP or DT_LEFT or DT_SINGLELINE;
  {$ELSE}
  Format := DT_TOP or DT_LEFT or DT_SINGLELINE;
  {$ENDIF}

  memoryBitmap := TBitmap.Create; // create memory-bitmap to draw flicker-free
  try
    memoryBitmap.Height := ClientRect.Bottom;
    memoryBitmap.Width := ClientRect.Right;
    memoryBitmap.Canvas.Font := Self.Font;

    textHeight := memoryBitmap.canvas.TextHeight(caption);
    textWidth := memoryBitmap.Canvas.TextWidth(caption);

    {$IFDEF DFS_COMPILER_4_UP}
    if BidiMode = bdRightToLeft then
      textBounds := Rect(ClientRect.Right - 10 - textWidth, ClientRect.Top,
        ClientRect.Right - 10 , ClientRect.Top + textHeight)
    else
      textBounds := Rect(ClientRect.Left + 10, ClientRect.Top,
        ClientRect.Left + 10 + textWidth,
        ClientRect.Top + textHeight);
    {$ELSE}
    textBounds := Rect(ClientRect.Left + 10, ClientRect.Top,
      ClientRect.Left + 10 + textWidth,
      ClientRect.Top + textHeight);
    {$ENDIF}
    textBounds := Rect(ClientRect.Left + 10, ClientRect.Top,
      ClientRect.Right - 10,
      ClientRect.Top + textHeight);

    // Draw Background
    if FTransparent then
      DrawParentImage(Self, memoryBitmap.Canvas)
    else
    begin
      memoryBitmap.Canvas.Brush.Color := Self.Color;
      memoryBitmap.Canvas.FillRect(ClientRect);
    end;

    // Draw Border
    memoryBitmap.Canvas.Pen.Color := FBorderColor;
    case FBorder of
      brFull:
        {$IFDEF DFS_COMPILER_4_UP}
        if BidiMode = bdRightToLeft then
          memoryBitmap.Canvas.Polyline([Point(ClientRect.Right - 15 - textWidth, ClientRect.top + (textHeight div 2)),
            Point(ClientRect.left, ClientRect.top + (textHeight div 2)),
            Point(ClientRect.left, ClientRect.bottom-1), Point(ClientRect.right-1, ClientRect.bottom-1),
            Point(ClientRect.right-1, ClientRect.top + (textHeight div 2)),
            Point(ClientRect.Right - 7 , ClientRect.top + (textHeight div 2))])
        else
          memoryBitmap.Canvas.Polyline([Point(ClientRect.left + 5, ClientRect.top + (textHeight div 2)),
            Point(ClientRect.left, ClientRect.top + (textHeight div 2)),
            Point(ClientRect.left, ClientRect.bottom-1), Point(ClientRect.right-1, ClientRect.bottom-1),
            Point(ClientRect.right-1, ClientRect.top + (textHeight div 2)),
            Point(ClientRect.left + 12 + textWidth, ClientRect.top + (textHeight div 2))]);
        {$ELSE}
        memoryBitmap.Canvas.Polyline([Point(ClientRect.left + 5, ClientRect.top + (textHeight div 2)),
          Point(ClientRect.left, ClientRect.top + (textHeight div 2)),
          Point(ClientRect.left, ClientRect.bottom-1), Point(ClientRect.right-1, ClientRect.bottom-1),
          Point(ClientRect.right-1, ClientRect.top + (textHeight div 2)),
          Point(ClientRect.left + 12 + textWidth, ClientRect.top + (textHeight div 2))]);
        {$ENDIF}
      brOnlyTopLine:
        {$IFDEF DFS_COMPILER_4_UP}
        if BidiMode = bdRightToLeft then
        begin
          memoryBitmap.Canvas.Polyline([Point(ClientRect.right - 5, ClientRect.top + (textHeight div 2)), Point(ClientRect.right, ClientRect.top + (textHeight div 2))]);
          memoryBitmap.Canvas.Polyline([Point(ClientRect.left+1, ClientRect.top + (textHeight div 2)), Point(ClientRect.right - 12 - textWidth, ClientRect.top + (textHeight div 2))]);
        end
        else
        begin
          memoryBitmap.Canvas.Polyline([Point(ClientRect.left + 5, ClientRect.top + (textHeight div 2)), Point(ClientRect.left, ClientRect.top + (textHeight div 2))]);
          memoryBitmap.Canvas.Polyline([Point(ClientRect.right-1, ClientRect.top + (textHeight div 2)), Point(ClientRect.left + 12 + textWidth, ClientRect.top + (textHeight div 2))]);
        end;
        {$ELSE}
        begin
          memoryBitmap.Canvas.Polyline([Point(ClientRect.left + 5, ClientRect.top + (textHeight div 2)), Point(ClientRect.left, ClientRect.top + (Canvas.textHeight(caption) div 2))]);
          memoryBitmap.Canvas.Polyline([Point(ClientRect.right-1, ClientRect.top + (textHeight div 2)), Point(ClientRect.left + 12 + textWidth, ClientRect.top + (textHeight div 2))]);
        end;
        {$ENDIF}
    end;

    // Draw Text
    memoryBitmap.Canvas.Brush.Style := bsClear;
    if not Enabled then
    begin
      OffsetRect(textBounds, 1, 1);
      memoryBitmap.Canvas.Font.Color := clBtnHighlight;
      DrawText(memoryBitmap.Canvas.Handle, PChar(Caption), Length(Caption), textBounds, Format);
      OffsetRect(textBounds, -1, -1);
      memoryBitmap.Canvas.Font.Color := clBtnShadow;
      DrawText(memoryBitmap.Canvas.Handle, PChar(Caption), Length(Caption), textBounds, Format);
    end
    else
      DrawText(memoryBitmap.Canvas.Handle, PChar(Caption), Length(Caption), textBounds, Format);

    // Copy memoryBitmap to screen
    canvas.CopyRect(ClientRect, memoryBitmap.canvas, ClientRect);
  finally
    memoryBitmap.free; // delete the bitmap
  end;
end;

procedure TFlatGroupBox.CMTextChanged (var Message: TWmNoParams);
begin
  inherited;
  Invalidate;
end;

procedure TFlatGroupBox.SetColors(const Index: Integer;
  const Value: TColor);
begin
  case Index of
    0: FBorderColor := Value;
  end;
  Invalidate;
end;

procedure TFlatGroupBox.SetBorder(const Value: TGroupBoxBorder);
begin
  FBorder := Value;
  Invalidate;
end;

procedure TFlatGroupBox.SetAdvColors(Index: Integer; Value: TAdvColors);
begin
  case Index of
    0: FAdvColorBorder := Value;
  end;
  CalcAdvColors;
  Invalidate;
end;

procedure TFlatGroupBox.SetUseAdvColors(Value: Boolean);
begin
  if Value <> FUseAdvColors then
  begin
    FUseAdvColors := Value;
    ParentColor := Value;
    CalcAdvColors;
    Invalidate;
  end;
end;

procedure TFlatGroupBox.CalcAdvColors;
begin
  if FUseAdvColors then
  begin
    FBorderColor := CalcAdvancedColor(Color, FBorderColor, FAdvColorBorder, darken);
  end;
end;

procedure TFlatGroupBox.CMParentColorChanged(var Message: TWMNoParams);
begin
  inherited;
  if FUseAdvColors then
  begin
    ParentColor := True;
    CalcAdvColors;
  end;
  Invalidate;
end;

procedure TFlatGroupBox.CMSysColorChange(var Message: TMessage);
begin
  if FUseAdvColors then
  begin
    ParentColor := True;
    CalcAdvColors;
  end;
  Invalidate;
end;

procedure TFlatGroupBox.CMDialogChar(var Message: TCMDialogChar);
begin
  with Message do
    if IsAccel(Message.CharCode, Caption) and CanFocus then
    begin
      SetFocus; 
      Result := 1;
    end;
end;

procedure TFlatGroupBox.CMEnabledChanged(var Message: TMessage);
begin
  inherited;
  Invalidate;
end;

procedure TFlatGroupBox.SetTransparent(const Value: Boolean);
begin
  FTransparent := Value;
  Invalidate;
end;

procedure TFlatGroupBox.WMMove(var Message: TWMMove);
begin
  inherited;
  if FTransparent then
    Invalidate;
end;

procedure TFlatGroupBox.WMSize(var Message: TWMSize);
begin
  inherited;
  if FTransparent then
    Invalidate;
end;

{$IFDEF DFS_COMPILER_4_UP}
procedure TFlatGroupBox.SetBiDiMode(Value: TBiDiMode);
begin
  inherited;
  Invalidate;
end;
{$ENDIF}

end.


?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
不卡的电视剧免费网站有什么| 亚洲不卡av一区二区三区| 4438x成人网最大色成网站| www.一区二区| 日本va欧美va精品发布| 国产高清在线精品| 成人动漫在线一区| 久久精品二区亚洲w码| 成人h版在线观看| 国产网站一区二区三区| 一本一本久久a久久精品综合麻豆 一本一道波多野结衣一区二区 | 欧美亚洲国产一区在线观看网站| 欧美性一区二区| 欧美日韩国产经典色站一区二区三区| 精品国产乱码91久久久久久网站| 亚洲三级视频在线观看| 久久国产福利国产秒拍| 欧美日韩1区2区| 中文字幕第一页久久| 午夜精品久久久久久久久| 97se亚洲国产综合自在线| 日韩精品一区二| 五月婷婷欧美视频| 日本高清不卡在线观看| 国产亚洲精品bt天堂精选| 日日摸夜夜添夜夜添国产精品| 国产精品中文欧美| 日韩一区二区免费高清| 一区二区三区.www| 激情另类小说区图片区视频区| 欧美一区二区啪啪| 1区2区3区精品视频| 国产乱码字幕精品高清av | 欧美不卡一区二区三区四区| 亚洲国产毛片aaaaa无费看| 99久久99久久精品免费观看| 国产精品美女久久久久久2018| 精品一区二区三区视频| 日韩一区二区三区免费看| 日韩 欧美一区二区三区| 欧美日韩国产123区| 亚洲国产一区二区三区| 国内久久精品视频| 欧美国产一区二区| 成人妖精视频yjsp地址| 日韩三级视频在线看| 精彩视频一区二区三区| 日韩免费高清视频| 免费不卡在线观看| 日韩欧美国产高清| 久久99久久久欧美国产| 91精品国产色综合久久不卡电影| 久久精品国产亚洲a| 26uuu精品一区二区在线观看| 精品在线一区二区| 国产精品理论片在线观看| 成人免费毛片aaaaa**| 亚洲欧洲精品一区二区三区| 91碰在线视频| 午夜婷婷国产麻豆精品| 日韩一二在线观看| 国产成人精品www牛牛影视| 国产午夜精品福利| 成人黄色大片在线观看| 日韩精品亚洲专区| 精品成人一区二区| 99久久久久免费精品国产| 中文字幕在线视频一区| 一本久道久久综合中文字幕| 亚洲成人7777| 欧美一区二区三区四区视频| 成人激情小说乱人伦| 亚洲欧美中日韩| 日韩视频一区在线观看| 色一区在线观看| 婷婷久久综合九色国产成人| 精品国产自在久精品国产| 日本韩国精品在线| 国产精品综合在线视频| 18欧美乱大交hd1984| 久久影视一区二区| 在线观看av不卡| 久久99国内精品| 午夜精品福利久久久| 久久久精品一品道一区| 欧美最猛黑人xxxxx猛交| 国产99久久精品| 亚洲成人av一区| 久久日一线二线三线suv| 欧美一区二视频| 成人综合婷婷国产精品久久免费| 欧美美女激情18p| 国产日韩欧美精品综合| 亚洲一区二区视频在线| 久久久国产精品午夜一区ai换脸| 首页亚洲欧美制服丝腿| 国产精品久久久久久亚洲毛片 | 亚洲一卡二卡三卡四卡无卡久久| 欧美一区二区三区成人| 欧洲av一区二区嗯嗯嗯啊| 国产精品夜夜嗨| 午夜欧美大尺度福利影院在线看| 久久久精品免费免费| 欧美蜜桃一区二区三区| eeuss鲁一区二区三区| 午夜激情一区二区三区| 最新国产精品久久精品| 精品久久一区二区三区| 首页国产丝袜综合| 欧美午夜精品一区| 亚洲精品成人精品456| 欧美日韩国产综合视频在线观看 | 欧美日韩国产中文| 亚洲国产成人午夜在线一区| 欧美激情一区在线| 本田岬高潮一区二区三区| 欧美电视剧在线观看完整版| 韩国在线一区二区| 国产精品美女久久久久久久久久久| 国产91高潮流白浆在线麻豆| 国产日韩在线不卡| 欧洲一区二区三区免费视频| 视频在线观看91| 久久久精品免费网站| 99re成人在线| 亚洲已满18点击进入久久| 在线播放视频一区| 国产成人av电影在线观看| 最新热久久免费视频| 国产精品高潮久久久久无| 成人午夜精品一区二区三区| 亚洲综合色噜噜狠狠| 国产日韩欧美在线一区| 欧美在线一二三四区| 成人av小说网| 丁香婷婷综合激情五月色| 五月婷婷另类国产| 中文字幕在线不卡| 中文字幕中文乱码欧美一区二区| 欧美麻豆精品久久久久久| 在线免费观看一区| 91在线观看成人| 中文字幕一区二区视频| 91麻豆免费观看| 成人白浆超碰人人人人| 91在线观看免费视频| 欧美日韩在线播| 精品久久久久久亚洲综合网| 久久久亚洲精品石原莉奈| 精品国产伦一区二区三区免费| 中日韩免费视频中文字幕| 欧美激情一区二区三区| 国内成人精品2018免费看| 国产精品久久久久久久久免费桃花 | 午夜精品成人在线| 九九精品视频在线看| 91色porny在线视频| 99免费精品视频| 国产午夜亚洲精品理论片色戒 | 日韩女优av电影在线观看| 国产欧美日韩不卡免费| 亚洲va天堂va国产va久| 国产成人8x视频一区二区| 欧美日韩国产乱码电影| 国产精品短视频| 久久99精品国产麻豆不卡| 色欧美88888久久久久久影院| 亚洲精品在线电影| 午夜精品久久久久久久久| 99国产精品久久久久久久久久| 欧美一级黄色片| 丝袜美腿高跟呻吟高潮一区| 不卡一区中文字幕| 久久综合色8888| 久久国产精品色婷婷| 欧美剧在线免费观看网站| 亚洲男人天堂一区| 国产成人丝袜美腿| 欧美成人女星排名| 天天综合日日夜夜精品| 色网站国产精品| 国产精品三级在线观看| 国产精选一区二区三区| 日韩情涩欧美日韩视频| 日韩精品亚洲专区| 欧美区在线观看| 午夜精品福利在线| 欧美视频在线不卡| 亚洲美女少妇撒尿| av电影在线不卡| 亚洲女人的天堂| 91在线播放网址| 亚洲精品国产a| 欧美综合欧美视频| 亚洲午夜久久久久| 欧美色综合影院| 亚洲观看高清完整版在线观看| 欧美性色黄大片手机版| 亚洲成人激情社区| 91精品国产91久久久久久一区二区|