楼主,注意语句的顺序,先调整窗口,在设置成打印对象。
'Dim doc As PrintDoc = e.Form.GernatePrintDoc()
e.Form.Page.Width = 241 '纸张宽度
e.Form.Page.Height = 139.7 '纸张高度
e.Form.Page.LeftMargin = 0 '设置左边距
e.Form.Page.RightMargin = 0 '设置右边距
e.Form.Page.TopMargin = 0 '设置上边距
e.Form.Page.BottomMargin = 0 '设置下边距
Dim doc As PrintDoc = e.Form.GernatePrintDoc()
doc.PageSetting.Landscape = True '横向打印
doc.Preview()