掲示板システム
ホーム
アクセス解析
カテゴリ
ログアウト
複数Imageの印刷 (ID:38253)
名前
ホームページ(ブログ、Twitterなど)のURL (省略可)
本文
Panel に スクロールバーはないのでおそらく ScrollBox だと仮定して procedure TForm1.Button1Click(Sender: TObject); var Bitmap: TBitmap; X,Y,I,VP,HP: Integer; SourceRect,DestRect: TRect; begin Bitmap := TBitmap.Create; Bitmap.Canvas.Brush.Color := ScrollBox1.Color; Bitmap.SetSize(PaintBox1.Width,PaintBox1.Height); VP := ScrollBox1.VertScrollBar.Position; HP := ScrollBox1.HorzScrollBar.Position; //PaintBox to Bitmap DestRect := Rect(HP,VP,HP+ScrollBox1.Width,VP+ScrollBox1.Height); SourceRect := Rect(HP,VP,HP+ScrollBox1.Width,VP+ScrollBox1.Height); Bitmap.Canvas.CopyRect(SourceRect,PaintBox1.Canvas,DestRect); //Image to Bitmap for I:=0 to Form1.ComponentCount -1 do begin if Form1.Components[I] is TImage then begin if TImage(Form1.Components[I]).Parent = ScrollBox1 then begin X := TImage(Form1.Components[I]).Left; Y := TImage(Form1.Components[I]).Top; Bitmap.Canvas.Draw(X+HP,Y+VP,TImage(Form1.Components[I]).Picture.Graphic); end; end; end; Bitmap.SaveToFile('C:\AAA.BMP'); Bitmap.Free; end;
←解決時は質問者本人がここをチェックしてください。
更新する
戻る
掲示板システム
Copyright 2021 Takeshi Okamoto All Rights Reserved.