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

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

?? xpmenu.pas

?? 本系統便用Delphi與Access2000開發了一套基于服務器與客戶端多層模式的學生宿舍管理系統
?? PAS
?? 第 1 頁 / 共 5 頁
字號:
 IconRect: Trect; Hot, Selected, Enabled, Checked, FTopMenu,
 IsRightToLeft: boolean);
var
  DefColor: TColor;
  X, Y: integer;
begin

  if (B <> nil) and (B.Width > 0) then
  begin
    X := IconRect.Left;
    Y := IconRect.Top + 1;

    if (Sender is TMenuItem) then
    begin
      inc(Y, 2);
      if FIconWidth > B.Width then
        X := X + ((FIconWidth - B.Width) div 2) - 1
      else
      begin
        if IsRightToLeft then
          X := IconRect.Right - b.Width - 2
        else
          X := IconRect.Left + 2;
      end;
    end;

    if FTopMenu then
    begin
      if IsRightToLeft then
        X := IconRect.Right - b.Width - 5
      else
        X := IconRect.Left + 1;
    end;


    if (Hot) and (not FTopMenu) and (Enabled) and (not Checked) then
      if not Selected then
      begin
        dec(X, 1);
        dec(Y, 1);
      end;

    if (not Hot) and (Enabled) and (not Checked) then
      if Is16Bit then
        DimBitmap(B, FDimLevel{30});


    if not Enabled then
    begin
      GrayBitmap(B, FGrayLevel );
      DimBitmap(B, 40);
    end;

    if (Hot) and (Enabled) and (not Checked) then
    begin
      if (Is16Bit) and (not UseSystemColors) and (Sender is TToolButton) then
        DefColor := NewColor(ACanvas, FSelectColor, 68)
      else
        DefColor := FFSelectColor;

      DefColor := GetShadeColor(ACanvas, DefColor, 50);
      DrawBitmapShadow(B, ACanvas, X + 2, Y + 2, DefColor);
    end;

    B.Transparent := true;
    ACanvas.Draw(X, Y, B);
  end;

end;


function TXPMenu.TopMenuFontColor(ACanvas: TCanvas; Color: TColor): TColor;
var
  r, g, b, avg: integer;
begin

  Color := ColorToRGB(Color);
  r := Color and $000000FF;
  g := (Color and $0000FF00) shr 8;
  b := (Color and $00FF0000) shr 16;

  Avg := (r + b) div 2;

  if (Avg > 150) or (g > 200) then
    Result := FFont.Color
  else
    Result := NewColor(ACanvas, Color, 90);

end;


procedure TXPMenu.SetActive(const Value: boolean);
begin
  if Value = FActive then exit;

  FActive := Value;
  if FActive then
    InitItems(FForm, true, true)
  else
    InitItems(FForm, false, true);

 // if (FForm <> nil) and (TForm(FForm).Menu <> nil) then
    Windows.DrawMenuBar(FForm.Handle);
end;

procedure TXPMenu.SetAutoDetect(const Value: boolean);
begin
  FAutoDetect := Value;
end;

procedure TXPMenu.SetForm(const Value: TScrollingWinControl);
var
  Hold: boolean;
begin
  if Value <> FForm then
  begin
    Hold := Active;
    Active := false;
    FForm := Value;
    if Hold then
      Active := True;
  end;
end;

procedure TXPMenu.SetFont(const Value: TFont);
begin
  FFont.Assign(Value);
  Windows.DrawMenuBar(FForm.Handle);

end;

procedure TXPMenu.SetColor(const Value: TColor);
begin
  FColor := Value;
end;

procedure TXPMenu.SetIconBackColor(const Value: TColor);
begin
  FIconBackColor := Value;
end;

procedure TXPMenu.SetMenuBarColor(const Value: TColor);
begin
  FMenuBarColor := Value;
  Windows.DrawMenuBar(FForm.Handle);
end;

procedure TXPMenu.SetCheckedColor(const Value: TColor);
begin
  FCheckedColor := Value;
end;

procedure TXPMenu.SetSeparatorColor(const Value: TColor);
begin
  FSeparatorColor := Value;
end;

procedure TXPMenu.SetSelectBorderColor(const Value: TColor);
begin
  FSelectBorderColor := Value;
end;

procedure TXPMenu.SetSelectColor(const Value: TColor);
begin
  FSelectColor := Value;
end;

procedure TXPMenu.SetDisabledColor(const Value: TColor);
begin
  FDisabledColor := Value;
end;

procedure TXPMenu.SetSelectFontColor(const Value: TColor);
begin
  FSelectFontColor := Value;
end;

procedure TXPMenu.SetIconWidth(const Value: integer);
begin
  FIconWidth := Value;
end;

procedure TXPMenu.SetDrawSelect(const Value: boolean);
begin
  FDrawSelect := Value;
end;



procedure TXPMenu.SetOverrideOwnerDraw(const Value: boolean);
begin
  FOverrideOwnerDraw := Value;
  if FActive then
    Active := True;
end;


procedure TXPMenu.SetUseSystemColors(const Value: boolean);
begin
  FUseSystemColors := Value;
  Windows.DrawMenuBar(FForm.Handle);
end;

procedure TXPMenu.SetGradient(const Value: boolean);
begin
  FGradient := Value;
end;

procedure TXPMenu.SetFlatMenu(const Value: boolean);
begin
  FFlatMenu := Value;
end;

procedure TXPMenu.SetXPContainers(const Value: TXPContainers);
begin
  if Value <> FXPContainers then
  begin
    if FActive then
    begin
      FActive := false;
      InitItems(FForm, false, true);
      FActive := true;
      FXPContainers := Value;
      InitItems(FForm, true, true);
    end;
  end;
  FXPContainers := Value;

end;

procedure TXPMenu.SetXPControls(const Value: TXPControls);
begin
  if Value <> FXPControls then
  begin
    if FActive then
    begin
      FActive := false;
      InitItems(FForm, false, true);
      FActive := true;
      FXPControls := Value;
      InitItems(FForm, true, true);
    end;
  end;
  FXPControls := Value;

end;


procedure GetSystemMenuFont(Font: TFont);
var
  FNonCLientMetrics: TNonCLientMetrics;
begin
  FNonCLientMetrics.cbSize := Sizeof(TNonCLientMetrics);
  if SystemParametersInfo(SPI_GETNONCLIENTMETRICS, 0, @FNonCLientMetrics,0) then
  begin
    Font.Handle := CreateFontIndirect(FNonCLientMetrics.lfMenuFont);
    Font.Color := clMenuText;

    //if Font.Name = 'MS Sans Serif' then
    //begin
    //  Font.Name := 'Tahoma';
    //  Font.Charset := DEFAULT_CHARSET;
    //end;

  end;
end;


procedure TXPMenu.DrawGradient(ACanvas: TCanvas; ARect: TRect;
 IsRightToLeft: boolean);
var
  i: integer;
  v: integer;
  FRect: TRect;
begin

  fRect := ARect;
  V := 0;
  if IsRightToLeft then
  begin
    fRect.Left := fRect.Right - 1;
    for i := ARect.Right Downto ARect.Left do
    begin
      if (fRect.Left < ARect.Right)
        and (fRect.Left > ARect.Right - FIconWidth + 5) then
        inc(v, 3)
      else
        inc(v, 1);

      if v > 96 then v := 96;
      ACanvas.Brush.Color := NewColor(ACanvas, FFIconBackColor, v);
      ACanvas.FillRect(fRect);

      fRect.Left := fRect.Left - 1;
      fRect.Right := fRect.Left - 1;
    end;
  end
  else
  begin
    fRect.Right := fRect.Left + 1;
    for i := ARect.Left to ARect.Right do
    begin
      if (fRect.Left > ARect.Left)
        and (fRect.Left < ARect.Left + FIconWidth + 5) then
        inc(v, 3)
      else
        inc(v, 1);

      if v > 96 then v := 96;
      ACanvas.Brush.Color := NewColor(ACanvas, FFIconBackColor, v);
      ACanvas.FillRect(fRect);

      fRect.Left := fRect.Left + 1;
      fRect.Right := fRect.Left + 1;
    end;
  end;
end;


procedure TXPMenu.DrawWindowBorder(hWnd: HWND; IsRightToLeft: boolean);
var
  WRect: TRect;
  dCanvas: TCanvas;
begin

  if hWnd <= 0 then
  begin
   exit;
  end;
  dCanvas := nil;
  try
    dCanvas := TCanvas.Create;
    dCanvas.Handle := GetWindowDC(GetDesktopWindow);

    GetWindowRect(hWnd, WRect);

    dCanvas.Brush.Style := bsClear;


    Dec(WRect.Right, 2);
    Dec(WRect.Bottom, 2);

    dCanvas.Pen.Color := FMenuBorderColor;
    dCanvas.Rectangle(WRect.Left, WRect.Top, WRect.Right, WRect.Bottom);

    if IsRightToLeft then
    begin
      dCanvas.Pen.Color := FFColor;
      dCanvas.Rectangle(WRect.Left + 1, WRect.Top + 1, WRect.Right - 2,
                        WRect.Top + 3);

      dCanvas.MoveTo(WRect.Left + 2, WRect.Top + 2);
      dCanvas.LineTo(WRect.Left + 2, WRect.Bottom - 2);


      dCanvas.Pen.Color := FFIconBackColor;
      dCanvas.MoveTo(WRect.Right - 2, WRect.Top + 2);
      dCanvas.LineTo(WRect.Right - 2, WRect.Bottom - 2);

      dCanvas.MoveTo(WRect.Right - 2, WRect.Top + 2);
      dCanvas.LineTo(WRect.Right - 1 - FIconWidth, WRect.Top + 2);
    end
    else
    begin
      if not FGradient then
      begin
        dCanvas.Pen.Color := FFColor;
        dCanvas.Rectangle(WRect.Left + 1, WRect.Top + 1, WRect.Right - 1,
                          WRect.Top + 3);

        dCanvas.Pen.Color := FFIconBackColor;
        dCanvas.MoveTo(WRect.Left + 1, WRect.Top + 2);
        dCanvas.LineTo(WRect.Left + 3 + FIconWidth, WRect.Top + 2);
      end
      else
        DrawGradient(dCanvas, Rect(WRect.Left + 1, WRect.Top + 1,
                                   WRect.Right - 3, WRect.Top + 3), IsRightToLeft);

      dCanvas.Pen.Color := FFIconBackColor;
      dCanvas.Rectangle(WRect.Left + 1, WRect.Top + 2,
                        WRect.Left + 3, WRect.Bottom - 1)

    end;

    Inc(WRect.Right, 2);
    Inc(WRect.Bottom, 2);

    dCanvas.Pen.Color := FMenuShadowColor;
    dCanvas.Rectangle(WRect.Left + 2, WRect.Bottom, WRect.Right, WRect.Bottom - 2);
    dCanvas.Rectangle(WRect.Right - 2, WRect.Bottom, WRect.Right, WRect.Top + 2);


    dCanvas.Pen.Color := clBtnFace ;
    dCanvas.Rectangle(WRect.Left, WRect.Bottom - 2, WRect.Left + 2, WRect.Bottom);
    dCanvas.Rectangle(WRect.Right - 2, WRect.Top, WRect.Right, WRect.Top + 2);
  finally
    ReleaseDC(GetDesktopWindow, dCanvas.Handle);
    dCanvas.Free;
  end;


end;


procedure TXPMenu.Notification(AComponent: TComponent;
  Operation: TOperation);
begin
  inherited Notification(AComponent, Operation);
  if not FActive then exit;
  if not FAutoDetect then exit;
  if (Operation = opInsert) and
     ((AComponent is TMenuItem) or (AComponent is TToolButton) or
      (AComponent is TControlBar)) then
  begin
    if not (csDesigning in ComponentState) then Active := true;
     //else
     //if ComponentState = [] then
     //   Active := true ;
  end;
end;


function GetShadeColor(ACanvas: TCanvas; clr: TColor; Value: integer): TColor;
var
  r, g, b: integer;

begin
  clr := ColorToRGB(clr);
  r := Clr and $000000FF;
  g := (Clr and $0000FF00) shr 8;
  b := (Clr and $00FF0000) shr 16;

  r := (r - value);
  if r < 0 then r := 0;
  if r > 255 then r := 255;

  g := (g - value) + 2;
  if g < 0 then g := 0;
  if g > 255 then g := 255;

  b := (b - value);
  if b < 0 then b := 0;
  if b > 255 then b := 255;

  //Result := Windows.GetNearestColor(ACanvas.Handle, RGB(r, g, b));
  Result := RGB(r, g, b);
end;

function NewColor(ACanvas: TCanvas; clr: TColor; Value: integer): TColor;
var
  r, g, b: integer;

begin
  if Value > 100 then Value := 100;
  clr := ColorToRGB(clr);
  r := Clr and $000000FF;
  g := (Clr and $0000FF00) shr 8;
  b := (Clr and $00FF0000) shr 16;


?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
午夜精品一区二区三区电影天堂| 亚洲精品高清在线| 国产乱码精品1区2区3区| 国产婷婷色一区二区三区| 国产精品亚洲成人| 亚洲女人****多毛耸耸8| 欧美亚洲综合久久| 久久66热偷产精品| 中文字幕一区二区三区四区| 在线一区二区三区| 五月天婷婷综合| 337p日本欧洲亚洲大胆色噜噜| 国产福利91精品| 一区二区三区成人在线视频| 7777精品伊人久久久大香线蕉完整版| 久久99久久久欧美国产| 国产精品久久久久久久第一福利 | 亚洲一二三四在线观看| 欧美精品一二三| 粉嫩蜜臀av国产精品网站| 亚洲欧洲一区二区在线播放| 欧美人体做爰大胆视频| 国产成人亚洲综合a∨婷婷| 夜夜嗨av一区二区三区网页| 精品美女被调教视频大全网站| 91在线码无精品| 久久成人免费日本黄色| 亚洲精品中文在线| 久久午夜免费电影| 欧美日韩一区三区| gogogo免费视频观看亚洲一| 美女爽到高潮91| 亚洲视频狠狠干| 精品欧美一区二区久久| 91福利在线观看| 国产99久久久久| 蜜桃av一区二区三区电影| 亚洲色图欧美在线| www久久久久| 欧美高清视频不卡网| 91在线视频播放| 国产aⅴ精品一区二区三区色成熟| 五月婷婷激情综合网| 中文字幕一区二区三区在线观看| 欧美不卡一二三| 在线播放视频一区| 欧美在线观看一区二区| 成人av资源在线| 国产精品中文欧美| 麻豆成人久久精品二区三区红 | 精品一区二区国语对白| 亚洲一区二区三区自拍| 亚洲欧洲99久久| 国产欧美精品一区aⅴ影院| 欧美不卡在线视频| 91精品国产色综合久久不卡电影 | 亚洲欧洲av在线| 久久久久久久电影| 精品处破学生在线二十三| 91.xcao| 欧美日韩mp4| 欧美视频一二三区| 精品视频资源站| 欧美亚洲图片小说| 欧美自拍丝袜亚洲| 91黄色激情网站| 色噜噜夜夜夜综合网| 色综合久久久久综合| 一本一本久久a久久精品综合麻豆 一本一道波多野结衣一区二区 | 亚洲欧洲另类国产综合| 国产日韩欧美一区二区三区乱码| 日韩视频国产视频| 精品国产乱码久久久久久图片| 欧美一级理论片| 精品国产一区二区三区不卡| 精品国产网站在线观看| 精品播放一区二区| 久久午夜电影网| 欧美国产禁国产网站cc| 亚洲色图视频网| 亚洲不卡一区二区三区| 亚洲福利电影网| 美女网站在线免费欧美精品| 狂野欧美性猛交blacked| 久久99精品国产麻豆不卡| 国产精品自产自拍| 成人性生交大合| 97se亚洲国产综合在线| 欧美在线观看18| 日韩三级电影网址| 国产亲近乱来精品视频 | 中文字幕精品一区二区精品绿巨人| 国产女人18水真多18精品一级做| 久久99国产精品麻豆| 韩国女主播成人在线观看| 粉嫩av一区二区三区| 在线观看成人免费视频| 欧美一区二区在线播放| 久久精品亚洲精品国产欧美kt∨| 国产精品久线在线观看| 亚洲成av人片一区二区三区| 久久www免费人成看片高清| 丰满放荡岳乱妇91ww| 欧日韩精品视频| 亚洲精品一区在线观看| 亚洲日本中文字幕区| 日本成人在线电影网| 国产91精品露脸国语对白| 91福利在线免费观看| 日韩欧美123| 亚洲欧美色一区| 久久国产精品99久久久久久老狼| 成人免费看的视频| 91精品国产欧美日韩| 国产精品久久久久久久久图文区| 亚洲一区免费在线观看| 久久9热精品视频| 91在线视频网址| 欧美精品一区视频| 亚洲一区在线观看网站| 国产夫妻精品视频| 欧美美女黄视频| 中文字幕一区二区三区av| 日韩国产欧美在线视频| 91丨九色丨国产丨porny| 日韩欧美中文一区| 亚洲精品一卡二卡| 懂色一区二区三区免费观看| 制服丝袜日韩国产| 一区精品在线播放| 国产精品白丝jk黑袜喷水| 在线不卡免费av| 综合av第一页| 精品亚洲国内自在自线福利| 91麻豆国产在线观看| 日本一区二区三区在线不卡| 石原莉奈在线亚洲三区| 色美美综合视频| 国产精品久久久久久久岛一牛影视 | 18成人在线视频| 国产一区二区三区四区五区美女 | 亚洲成av人片在线| 不卡视频免费播放| 精品欧美乱码久久久久久 | 狠狠久久亚洲欧美| 欧美性色黄大片手机版| 国产精品理伦片| 国产精品1区2区| 精品美女在线观看| 免费高清在线视频一区·| 欧美性猛片aaaaaaa做受| 亚洲人成7777| 色婷婷综合五月| 亚洲欧美另类在线| 色综合久久中文综合久久97| 一区精品在线播放| 99久久婷婷国产| 中文字幕综合网| 91在线播放网址| 亚洲乱码中文字幕| 色老汉一区二区三区| 亚洲精品一二三| 91国内精品野花午夜精品| 亚洲女性喷水在线观看一区| 91麻豆国产精品久久| 亚洲欧美日韩一区二区| 色拍拍在线精品视频8848| 亚洲卡通欧美制服中文| 一本色道久久综合亚洲精品按摩| 亚洲男同1069视频| 欧美午夜影院一区| 午夜精品久久久| 日韩欧美精品在线| 极品少妇xxxx偷拍精品少妇| 久久久久99精品一区| 成人小视频在线| 一区二区三区色| 欧美日韩免费电影| 麻豆精品在线看| 国产亚洲成av人在线观看导航| 成人av免费在线播放| 亚洲激情综合网| 日韩一区二区中文字幕| 国产乱码精品一区二区三区五月婷 | 欧美一级片在线看| 久久99精品久久只有精品| 久久久99精品免费观看不卡| www.亚洲人| 香蕉影视欧美成人| 26uuu精品一区二区在线观看| 国产91富婆露脸刺激对白| 亚洲人成精品久久久久| 91精品国产综合久久福利软件| 国产伦精品一区二区三区视频青涩 | 麻豆精品视频在线观看| 中文字幕 久热精品 视频在线| 色综合久久中文综合久久牛| 日韩av网站免费在线| 国产精品女上位| 在线播放亚洲一区|