请问:我在 设计“页面设置”窗体时,是不是也要设定一个数据表,包括:方向、宽度、高度、左边距、右边距、上边距、下边距,然后绑定到窗体,在窗体的afterload 事件中写入如下代码:
Dim rdo2 As WinForm.RadioButton = e.Form.Controls("RadioButton2")
If rdo2.Checked = True Then
e.Form.Page.Landscape = False
Else
e.Form.Page.Landscape = True
End If
Dim hig As WinForm.NumericComboBox = e.Form.Controls("hig")
Dim wid As WinForm.NumericComboBox = e.Form.Controls("wid")
e.Form.Page.Width = wid.value
e.Form.Page.Height = hig.Value
Dim zbj As WinForm.NumericComboBox = e.Form.Controls("zb")
Dim ybj As WinForm.NumericComboBox = e.Form.Controls("yb")
Dim sbj As WinForm.NumericComboBox = e.Form.Controls("sb")
Dim xbj As WinForm.NumericComboBox = e.Form.Controls("xb")
e.Form.Page.LeftMargin = zbj.value
e.Form.Page.RightMargin = ybj.value
e.Form.Page.BottomMargin = xbj.value
e.Form.Page.TopMargin = sbj.value
Dim doc As PrintDoc = e.Form.GernatePrintDoc()
doc.Preview()
请指教,谢谢!