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

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

?? prvieweh.pas

?? EHlib CN For Delphi2009
?? 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一区二区三区免费野_久草精品视频
国产精品的网站| 欧美一级一级性生活免费录像| 久久免费美女视频| 韩国欧美国产1区| 日韩免费观看高清完整版在线观看| 美女高潮久久久| 精品国产乱码久久久久久影片| 紧缚奴在线一区二区三区| 欧美刺激脚交jootjob| 激情五月激情综合网| 中文字幕乱码久久午夜不卡| 91免费国产在线| 亚洲一区二区三区四区中文字幕| 欧美妇女性影城| 激情综合五月婷婷| 国产精品女主播在线观看| 91视频91自| 日韩精品亚洲一区| 欧美精品一区二| thepron国产精品| 亚洲成人自拍偷拍| 26uuu久久天堂性欧美| jlzzjlzz亚洲女人18| 美女在线视频一区| 久久先锋影音av| 91丨九色丨蝌蚪丨老版| 99九九99九九九视频精品| 免费观看日韩电影| 午夜精品久久久久影视| 国产成人综合在线播放| 亚洲人成网站在线| 日韩欧美www| 91视频com| 精品一区二区三区免费播放| 日韩毛片高清在线播放| 欧美一区二区三区电影| 成人avav在线| 琪琪久久久久日韩精品| 国产精品无码永久免费888| 欧美日韩国产片| 丁香激情综合五月| 偷拍与自拍一区| 国产亚洲欧美色| 欧美久久一二三四区| 成人午夜免费电影| 男女性色大片免费观看一区二区 | 国产91精品久久久久久久网曝门| 樱桃视频在线观看一区| 国产日韩欧美电影| 91精品国产综合久久香蕉麻豆| eeuss影院一区二区三区 | 久久99精品一区二区三区| 一区二区三区在线视频观看58| 久久久久久久网| 欧美一级视频精品观看| 99re这里只有精品6| 国产成都精品91一区二区三| 亚洲午夜一二三区视频| 综合分类小说区另类春色亚洲小说欧美| 51精品国自产在线| 欧洲精品在线观看| 成人av网站大全| 国产综合一区二区| 久久国产福利国产秒拍| 婷婷综合久久一区二区三区| 亚洲精品国产精华液| 中文字幕一区二区三区色视频| 久久一夜天堂av一区二区三区| 欧美日韩精品二区第二页| 一本色道**综合亚洲精品蜜桃冫| 国产成人h网站| 国产露脸91国语对白| 免费高清成人在线| 日本欧美大码aⅴ在线播放| 香蕉久久夜色精品国产使用方法 | 91啦中文在线观看| 97久久超碰精品国产| 成人黄色一级视频| 成人深夜福利app| jizz一区二区| 91麻豆免费在线观看| 91网站在线观看视频| 91在线高清观看| 91社区在线播放| 欧洲av一区二区嗯嗯嗯啊| 91激情在线视频| 精品视频一区三区九区| 欧美日韩情趣电影| 欧美一区二区三区喷汁尤物| 日韩欧美一级二级三级久久久| 日韩久久久久久| 久久久国际精品| 中文字幕高清不卡| 亚洲免费视频成人| 精品一区二区三区在线播放| 久久精品国产免费| 国产69精品久久777的优势| 99久久国产综合色|国产精品| 99久久综合色| 欧美日韩三级在线| 精品国产青草久久久久福利| 国产欧美精品日韩区二区麻豆天美| 国产女人aaa级久久久级 | 亚洲精品免费一二三区| 亚洲国产欧美一区二区三区丁香婷| 香蕉久久夜色精品国产使用方法| 蜜桃av一区二区| 高清不卡在线观看| 日本道免费精品一区二区三区| 欧美精品成人一区二区三区四区| 精品捆绑美女sm三区| 国产精品美女一区二区| 亚洲一区二区三区在线看| 精品一区二区三区免费| 色综合天天综合网国产成人综合天 | 激情五月激情综合网| 91色乱码一区二区三区| 5月丁香婷婷综合| 国产日韩欧美制服另类| 艳妇臀荡乳欲伦亚洲一区| 久久激五月天综合精品| 99re热这里只有精品视频| 777精品伊人久久久久大香线蕉| 国产欧美精品在线观看| 天天影视涩香欲综合网| 国产精品一区二区久激情瑜伽| 日本道免费精品一区二区三区| 久久综合成人精品亚洲另类欧美 | 久久精品久久精品| 色吧成人激情小说| 26uuu色噜噜精品一区二区| 国产在线不卡视频| 99久久精品免费看| 日韩欧美国产一区二区三区 | 亚洲国产日韩综合久久精品| 国产乱码精品一区二区三 | 日本一道高清亚洲日美韩| 成人综合婷婷国产精品久久| 欧美精品久久天天躁| 中文字幕亚洲一区二区va在线| 久久精品国产**网站演员| 在线观看国产精品网站| 日本一区二区三区高清不卡| 美女一区二区在线观看| 欧美日韩一区不卡| 亚洲视频一二区| 国产69精品久久久久777| 欧美电影免费观看高清完整版在| 亚洲在线免费播放| 91亚洲精品久久久蜜桃| 日本一区二区三区视频视频| 国产在线国偷精品免费看| 91精品国产91久久久久久一区二区| 亚洲欧美色综合| 成人黄色小视频在线观看| 国产亚洲成aⅴ人片在线观看| 久久成人麻豆午夜电影| 欧美精品一二三| 午夜亚洲福利老司机| 欧美自拍丝袜亚洲| 亚洲欧美一区二区不卡| 99在线视频精品| 国产精品久久久久久久久晋中| 大白屁股一区二区视频| 国产亚洲综合在线| 国产九色精品成人porny| 精品少妇一区二区三区在线播放| 奇米亚洲午夜久久精品| 7777精品伊人久久久大香线蕉完整版 | 奇米色一区二区三区四区| wwwwww.欧美系列| 蜜桃一区二区三区在线| 精品久久人人做人人爽| 久久成人免费网站| 久久久.com| 国产成人aaaa| 亚洲视频电影在线| 欧美在线免费视屏| 青青草原综合久久大伊人精品| 91精品国产手机| 美女精品一区二区| 久久精品夜夜夜夜久久| 成人自拍视频在线观看| 亚洲欧洲精品一区二区三区不卡| 99久久精品国产导航| 亚洲香蕉伊在人在线观| 欧美一区午夜视频在线观看| 久久电影网站中文字幕| 久久精品亚洲乱码伦伦中文| 成人免费视频视频| 一区二区在线观看免费视频播放| 欧美网站大全在线观看| 日韩中文字幕1| 久久精品人人做人人综合| youjizz国产精品| 亚洲成人在线免费| 精品日产卡一卡二卡麻豆| 成人精品国产免费网站| 亚洲一区二区三区四区五区中文| 日韩亚洲国产中文字幕欧美|