Dim sp = e.Form.Controls("SplitContainer1")Dim doc As PrintDoc = e.Form.GernatePrintDoc(sp.panel2)doc.Preview()