我设置了viewer控件的滚动条属性,但是没有效果,求高手解答。
viewerPre.HorizontalScroll.Visible = True
viewerPre.HorizontalScroll.Enabled = True
详细代码如下
Public Sub PreviewReprot(ByVal strRptName As String, ByVal dcmSection As GrapeCity.ActiveReports.Document.SectionDocument)
Dim frmPre As New Form
Dim viewerPre As New GrapeCity.ActiveReports.Viewer.Win.Viewer
viewerPre.CurrentPage = 0
viewerPre.PreviewPages = 0
viewerPre.ScrollbarEnabled = True
viewerPre.VerticalScroll.Visible = True
viewerPre.VerticalScroll.Enabled = True
viewerPre.HorizontalScroll.Visible = True
viewerPre.HorizontalScroll.Enabled = True
frmPre.Controls.Add(viewerPre)
frmPre.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen
'frmPre.WindowState = System.Windows.Forms.FormWindowState.Maximized
frmPre.Height = viewerPre.Height
frmPre.Width = viewerPre.Width
viewerPre.LoadDocument(dcmSection)
frmPre.Text = strRptName
AddHandler frmPre.Resize, New EventHandler(AddressOf Form_Resize)
frmPre.ShowDialog()
frmPre.Dispose()
End Sub |
|