Hi folks,

mit dem folgenden Code kann ich aus einem Window eine Listbox drucken. Das 
funktioniert erstmal gut.
Aber ich möchte nicht die ganze Listbox drucken sondern nur ein Teil. 
Wie kann ich den Bildausschnitt einschränken?

  Dim g as Graphics
  Dim pict as Picture = NewPicture(Listbox1(0).Width+0, Listbox1(0).Height, 32)
  
  Dim p as PrinterSetup
  Pict.HorizontalResolution =300
  Pict.VerticalResolution = 300
  
  Listbox1(0).DrawInto pict.Graphics,0,0
  p = New PrinterSetup
  If p.pageSetupDialog then
    g = OpenPrinterDialog(p)
    if g <> nil then
      g.DrawPicture pict, 0,0,Listbox1(0).Width/2, 
Listbox1(0).Height/2,0,0,Listbox1(0).Width, Listbox1(0).Height
    end if
  end if


Klemens 












Antwort per Email an