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

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

?? prvieweh.pas

?? 一個功能強大的DBGRID控件
?? PAS
?? 第 1 頁 / 共 3 頁
字號:
  HorzScrollBar.Tracking := True;
  VertScrollBar.Tracking := True;
  FScalePercent := 100;
end;

destructor TPreviewBox.Destroy;
begin
  FreeAndNil(FPrinter);
  inherited;
end;

procedure TPreviewBox.CreateParams(var Params: TCreateParams);
const
  BorderStyles: array[TBorderStyle] of DWORD = (0, WS_BORDER);
begin
  inherited CreateParams(Params);
  Params.Style := Params.Style or WS_CLIPCHILDREN;
end;

procedure TPreviewBox.KeyDown(var Key: Word; Shift: TShiftState);
begin
  inherited;
  with VertScrollBar do
    case Key of
      VK_UP:
        if ssCtrl in Shift then Position := Position - ClientHeight + Increment
        else Position := Position - Increment;
      VK_Down:
        if ssCtrl in Shift then Position := Position + ClientHeight - Increment
        else Position := Position + Increment;
      VK_Prior:
        if ssCtrl in Shift then Position := 0
        else Position := Position - ClientHeight + Increment;
      VK_Next:
        if ssCtrl in Shift then Position := Range
        else Position := Position + ClientHeight - Increment;
    end;
  with HorzScrollBar do
    case Key of
      VK_Left:
        if ssCtrl in Shift then Position := Position - ClientWidth + Increment
        else Position := Position - Increment;
      VK_Right:
        if ssCtrl in Shift then Position := Position + ClientWidth - Increment
        else Position := Position + Increment;
      VK_Home:
        if ssCtrl in Shift then
        begin
          Position := 0;
          VertScrollBar.Position := 0;
        end
        else Position := 0;
      VK_End:
        if ssCtrl in Shift then
        begin
          Position := Range;
          VertScrollBar.Position := VertScrollBar.Range;
        end
        else Position := Range;
    end;
end;

procedure TPreviewBox.MouseDown(Button: TMouseButton; Shift: TShiftState;
  X, Y: Integer);
begin
  SetFocus;
end;

procedure TPreviewBox.PrintDialog;
var Page: Integer;
  OldPrinter: TPrinter;
begin
  OldPrinter := PrintersSetPrinter(Printer.Printer);
  try
    with TPrintDialog.Create(Owner) do
    try
      Options := Options + [poPageNums];
      MinPage := 1;
      MaxPage := PageCount;
      FromPage := 1;
      ToPage := PageCount;
      if Execute then
        if Assigned(Printer) then
        begin
          if Printer.FMetafileList.Count = 0 then Exit;
          with PrintersPrinter do
          begin
            BeginDoc;
            for Page := FromPage to ToPage do
            begin
              Printer.DrawPage(Printer, Canvas, Page);
              if Page < ToPage then NewPage;
            end;
            EndDoc;
          end;
        end;
    finally
      Free;
    end;
  finally
    PrintersSetPrinter(OldPrinter);
  end;
end;

procedure TPreviewBox.PrinterSetupDialog;
var OldPrinter: TPrinter;
begin
  OldPrinter := PrintersSetPrinter(Printer.Printer);
  try
    if Assigned(OnPrinterSetupDialog) then
      OnPrinterSetupDialog(Self)
    else
      with TPrinterSetupDialog.Create(Owner) do
      try
        if Execute then
        begin
          UpdatePageSetup;
          if Assigned(FOnPrinterSetupChanged)
            then FOnPrinterSetupChanged(Self);
        end;
      finally
        Free;
      end;
  finally
    PrintersSetPrinter(OldPrinter);
  end;
end;

procedure TPreviewBox.SetPageIndex(Value: Integer);
begin
  if Value < 1 then Value := 1;
  if Value > PageCount then Value := PageCount;
  if Value <> FPageIndex then
  begin
    FPageIndex := Value;
    UpdatePreview;
    if Assigned(OnPrinterPreviewChanged) then OnPrinterPreviewChanged(Self);
  end;
end;

procedure TPreviewBox.SetPrinter(const Value: TPrinterPreview);
begin
  FPrinter := Value;
end;

procedure TPreviewBox.SetViewMode(const Value: TViewMode);
begin
  if Value <> FViewMode then
  begin
    FViewMode := Value;
    UpdatePageSetup;
  end;
  if Assigned(OnPrinterPreviewChanged) then OnPrinterPreviewChanged(Self);
end;

procedure TPreviewBox.UpdatePageSetup;
var
  Scaling: Integer;
  ALeft, ATop, AWidth, AHeight: Integer;
begin
//  pnlShadow.Visible:=False;
//  LockWindowUpdate(Handle);
  try
    with FDrawPanel, Printer do
    begin
      ALeft := Left; ATop := Top; AWidth := Width; AHeight := Height;
//    Visible:=False;
      case FViewMode of
        vm500: Scaling := 500;
        vm200: Scaling := 200;
        vm150: Scaling := 150;
        vm100: Scaling := 100;
        vm75: Scaling := 75;
        vm50: Scaling := 50;
        vm25: Scaling := 25;
        vm10: Scaling := 10;
        vmPageWidth: // on width pages
          begin
            VertScrollBar.Position := 0;
            HorzScrollBar.Position := 0;
            Scaling := 1;
            ALeft := 8;
            ATop := 8;
            AWidth := Self.Width - 20 - GetSystemMetrics(sm_CXVScroll);
            if Printer.Printers.Count > 0 then
            begin
              AHeight := AWidth * GetDeviceCaps(Printer.Handle, VertSize) div
                GetDeviceCaps(Printer.Handle, HorzSize);
              FScalePercent := AWidth * 100 div (PageWidth * (Self.Owner as TForm).PixelsPerInch div
                GetDeviceCaps(Printer.Handle, LOGPIXELSX));
            end else
            begin
              AHeight := AWidth * DefaultPrinterVerticalSizeMM div
                DefaultPrinterHorizontalSizeMM;
              FScalePercent := AWidth * 100 div (PageWidth * (Self.Owner as TForm).PixelsPerInch div
                DefaultPrinterPixelsPerInchX);
            end;
            VertScrollBar.Range := AHeight + 16;
            HorzScrollBar.Range := 0;
          end;
        vmFullPage: // 耱疣龕鱘 鰣腓覲?          begin
            Scaling := 1;
            VertScrollBar.Range := 0;
            HorzScrollBar.Range := 0;
            VertScrollBar.Position := 0;
            HorzScrollBar.Position := 0;
            AHeight := Self.ClientHeight - 16;
            if Printer.Printers.Count > 0 then
              AWidth := AHeight * GetDeviceCaps(Printer.Handle, HorzSize) div
                GetDeviceCaps(Printer.Handle, VertSize)
            else
              AWidth := AHeight * DefaultPrinterHorizontalSizeMM div
                DefaultPrinterVerticalSizeMM;
            if AWidth > Self.ClientWidth - 16 then
            begin
              AWidth := Self.ClientWidth - 16;
              if Printer.Printers.Count > 0 then
                AHeight := AWidth * GetDeviceCaps(Printer.Handle, VertSize) div
                  GetDeviceCaps(Printer.Handle, HorzSize)
              else
                AHeight := AWidth * DefaultPrinterVerticalSizeMM div
                  DefaultPrinterHorizontalSizeMM;
            end;
            ALeft := (Self.ClientWidth - AWidth) div 2;
            ATop := (Self.ClientHeight - AHeight) div 2;
            FScalePercent := 100;
          end;
      else Scaling := 1;
      end;
      case FViewMode of
        vm500..vm10:
          begin
            VertScrollBar.Position := 0;
            HorzScrollBar.Position := 0;
            ALeft := 8;
            ATop := 8;
            if Printer.Printers.Count > 0 then
            begin
//              AWidth := Scaling * PageWidth * (Self.Owner as TForm).PixelsPerInch div
              AWidth := Scaling * PageWidth * Screen.PixelsPerInch div
                GetDeviceCaps(Printer.Handle, LOGPIXELSX) div 100;
              AHeight := AWidth * GetDeviceCaps(Printer.Handle, VertSize) div
                GetDeviceCaps(Printer.Handle, HorzSize);
            end else
            begin
//              AWidth := Scaling * PageWidth * (Self.Owner as TForm).PixelsPerInch div
              AWidth := Scaling * PageWidth * Screen.PixelsPerInch div
                DefaultPrinterPixelsPerInchX div 100;
              AHeight := AWidth * DefaultPrinterVerticalSizeMM div
                DefaultPrinterHorizontalSizeMM;
            end;
            VertScrollBar.Range := AHeight + 16;
            HorzScrollBar.Range := AWidth + 16;
            if (AWidth + 16) < Self.ClientWidth then
              ALeft := (Self.ClientWidth - AWidth) div 2;
            if (AHeight + 16) < Self.ClientHeight then
              ATop := (Self.ClientHeight - AHeight) div 2;
            FScalePercent := Scaling;
          end;
      end;
    //Visible:=True;
    end;
    FDrawPanel.Invalidate;
    FDrawPanel.SetBounds(ALeft, ATop, AWidth, AHeight);
    pnlShadow.SetBounds(FDrawPanel.Left + 4, FDrawPanel.Top + 4, FDrawPanel.Width, FDrawPanel.Height);
    //pnlShadow.Visible:=True;
  finally
//    LockWindowUpdate(0);
  end;
end;

procedure TPreviewBox.UpdatePreview;
begin
  Invalidate;
  FDrawPanel.Invalidate;
{  with FDrawPanel do
  begin
    Hide;
    Show;
  end;}
end;

procedure TPreviewBox.WMGetDlgCode(var Msg: TWMGetDlgCode);
begin
  Msg.Result := DLGC_WANTARROWS;
end;

procedure TPreviewBox.WMSize(var Message: TWMSize);
begin
  inherited;
  if (ViewMode in [vmPageWidth, vmFullPage]) or
    ((FDrawPanel.Width + 16) < ClientWidth) or
    ((FDrawPanel.Height + 16) < ClientHeight) then
    UpdatePageSetup;
end;

procedure TPreviewBox.SetPrinterSetupOwner(const Value: TComponent);
begin
  if FPrinterSetupOwner = Value then Exit;
  FPrinterSetupOwner := Value;
  if Assigned(Value) then FPrinterSetupOwner.FreeNotification(Self);
  if Assigned(OnPrinterPreviewChanged) then OnPrinterPreviewChanged(Self);
end;

procedure TPreviewBox.Notification(AComponent: TComponent; Operation: TOperation);
begin
  inherited Notification(AComponent, Operation);
  if (Operation = opRemove) and (AComponent = PrinterSetupOwner)
    then PrinterSetupOwner := nil;
end;

function TPreviewBox.DoMouseWheelDown(Shift: TShiftState; MousePos: TPoint): Boolean;
begin
  Result := inherited DoMouseWheelDown(Shift, MousePos);
  if not Result then
  begin
    with VertScrollBar do
      if Range < ClientHeight
        then PageIndex := PageIndex + 1
        else Position := Position + Increment * Mouse.WheelScrollLines * FScalePercent div 100;
    Result := True;
  end;
end;

function TPreviewBox.DoMouseWheelUp(Shift: TShiftState; MousePos: TPoint): Boolean;
begin
  Result := inherited DoMouseWheelUp(Shift, MousePos);
  if not Result then
  begin
    with VertScrollBar do
      if Range < ClientHeight
        then PageIndex := PageIndex - 1
        else Position := Position - Increment * Mouse.WheelScrollLines * FScalePercent div 100;
    Result := True;
  end;
end;

{ TPrinterPreview }

constructor TPrinterPreview.Create;
begin
  inherited Create;
  FMetafileList := TList.Create;
  FPrinter := TPrinter.Create;
end;

destructor TPrinterPreview.Destroy;
var i: Integer;
begin
  for i := 0 to FMetafileList.Count - 1 do
    TMetaFile(FMetafileList[i]).Free;
  FreeAndNil(FMetafileList);
  FreeAndNil(FPrinter);
  inherited Destroy;

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
国产98色在线|日韩| 91电影在线观看| 色狠狠一区二区| 欧美mv日韩mv国产网站app| 亚洲精品免费在线观看| 国产在线精品一区二区三区不卡 | 欧美日韩美少妇| 亚洲国产精品激情在线观看| 日本不卡视频在线| 欧美日韩三级一区二区| 中文字幕人成不卡一区| 韩国成人福利片在线播放| 5858s免费视频成人| 亚洲一区成人在线| 日本福利一区二区| 亚洲人成人一区二区在线观看 | 久久久亚洲精品一区二区三区| 亚洲h在线观看| 91蝌蚪porny九色| 国产精品久久三区| 国产成人精品午夜视频免费| 精品福利一二区| 久久精品99久久久| 欧美大尺度电影在线| 麻豆精品在线播放| 日韩小视频在线观看专区| 日本在线观看不卡视频| 欧美狂野另类xxxxoooo| 污片在线观看一区二区| 欧美综合一区二区| 亚洲一区二区四区蜜桃| 欧美午夜电影一区| 日韩中文欧美在线| 日韩精品一区在线| 狠狠色丁香婷综合久久| 2022国产精品视频| 成人免费视频一区| 亚洲色图制服诱惑| 欧美精品视频www在线观看| 天堂久久一区二区三区| 日韩欧美国产一区在线观看| 国产综合久久久久久鬼色| 久久久精品日韩欧美| 成人精品免费网站| 亚洲视频一区在线| 欧美日本国产视频| 久久黄色级2电影| 中文字幕国产精品一区二区| 91麻豆精品视频| 天天综合色天天综合色h| 精品久久免费看| 成人不卡免费av| 亚洲小说欧美激情另类| 欧美电影免费观看高清完整版在线观看| 久久成人羞羞网站| 国产精品国产三级国产aⅴ无密码| 一本高清dvd不卡在线观看| 亚洲国产成人porn| 久久婷婷成人综合色| 色综合久久综合中文综合网| 日本少妇一区二区| 国产精品久久久久久久久久免费看| 91久久人澡人人添人人爽欧美| 日韩中文字幕一区二区三区| 日本一区二区三区电影| 欧美视频完全免费看| 国产毛片一区二区| 亚洲一区视频在线| 国产亚洲午夜高清国产拍精品| 91在线视频在线| 美国av一区二区| 亚洲精品国产a久久久久久| 2021久久国产精品不只是精品| 日本乱人伦aⅴ精品| 国产综合成人久久大片91| 亚洲激情校园春色| 国产日韩欧美不卡在线| 欧美酷刑日本凌虐凌虐| 91香蕉视频mp4| 国产酒店精品激情| 日韩vs国产vs欧美| 一区二区三区91| 中文字幕久久午夜不卡| 精品欧美一区二区久久 | 欧美欧美欧美欧美| 成人性视频网站| 久久99久久99| 亚洲国产欧美另类丝袜| 亚洲欧美日韩国产手机在线 | 国产精品99久| 免费欧美高清视频| 午夜成人免费视频| 亚洲影视在线播放| 亚洲欧美在线aaa| 亚洲国产精品二十页| 精品国产乱码久久久久久浪潮| 欧美色视频在线观看| 91免费国产在线观看| 国产成人一区二区精品非洲| 极品美女销魂一区二区三区| 男人的天堂亚洲一区| 黑人精品欧美一区二区蜜桃 | 韩国理伦片一区二区三区在线播放| 亚洲韩国一区二区三区| 亚洲综合丁香婷婷六月香| 18成人在线视频| 亚洲人成网站影音先锋播放| 国产精品国产三级国产普通话蜜臀 | 水蜜桃久久夜色精品一区的特点| 亚洲欧美视频在线观看视频| 亚洲视频你懂的| 自拍偷拍欧美激情| 中文字幕字幕中文在线中不卡视频| 久久精品人人做人人爽人人| 国产亚洲欧美一区在线观看| 久久久久久久久久久久电影 | 91精品黄色片免费大全| 欧美精品成人一区二区三区四区| 欧美日本不卡视频| 日韩欧美国产一区在线观看| 精品福利二区三区| 久久久久国产精品厨房| 中文欧美字幕免费| 亚洲人吸女人奶水| 亚洲在线观看免费| 日本中文字幕一区二区视频| 美国十次综合导航| 成人午夜又粗又硬又大| 99精品在线观看视频| 欧美亚洲综合一区| 678五月天丁香亚洲综合网| 亚洲精品一区二区三区蜜桃下载 | 欧美一区二区三区爱爱| 欧美大片在线观看一区| 欧美激情一区在线观看| 亚洲美女电影在线| 日韩高清不卡在线| 国产精品亚洲专一区二区三区| 成人va在线观看| 91精品免费在线| 国产亚洲一区二区三区四区 | 一本到不卡免费一区二区| 欧美视频一区二区| 久久这里只精品最新地址| 日韩理论片一区二区| 性欧美疯狂xxxxbbbb| 国产在线不卡视频| 在线一区二区三区四区五区| 日韩免费性生活视频播放| 国产精品萝li| 国产99精品视频| 欧美欧美欧美欧美首页| 国产欧美精品区一区二区三区| 一区二区三区日韩欧美| 韩国av一区二区三区| 色婷婷精品久久二区二区蜜臂av| 91精品国产综合久久精品| 国产精品色婷婷久久58| 日韩综合小视频| 91一区二区在线观看| 精品国产伦理网| 亚洲国产wwwccc36天堂| 成人毛片视频在线观看| 日韩一区二区免费视频| 亚洲六月丁香色婷婷综合久久| 国产尤物一区二区在线| 欧美日本乱大交xxxxx| 日韩一区中文字幕| 国产成人无遮挡在线视频| 6080国产精品一区二区| 一区二区三区在线观看国产| 懂色av中文一区二区三区| 日韩精品最新网址| 日韩精品国产欧美| 色88888久久久久久影院野外| 国产色产综合产在线视频| 日本视频中文字幕一区二区三区| 91福利资源站| 中文字幕综合网| caoporm超碰国产精品| 久久久久国色av免费看影院| 麻豆一区二区在线| 欧美一级欧美三级| 性做久久久久久久免费看| 色8久久精品久久久久久蜜 | 91看片淫黄大片一级在线观看| 久久亚洲一区二区三区明星换脸 | 日本欧美肥老太交大片| 欧美三区在线观看| 一区二区高清免费观看影视大全 | 国产一区 二区 三区一级| 欧美一区二区三区系列电影| 亚洲成人1区2区| 欧美三级蜜桃2在线观看| 一级日本不卡的影视| 色乱码一区二区三区88| 亚洲激情在线播放| 欧美在线影院一区二区| 亚洲一区二区三区视频在线播放| 色嗨嗨av一区二区三区|