将Imagedata转换为ActiveReports中的ImageBytes 16
我在Designer.vb文件中的ActiveReports 12中有以下代码。我正在手动升级到ActiveReports 16(因为从Visual Studio菜单中选择升级选项不起作用),并且需要转换所有报告文件中的所有实例grapecity.activereports.sectionreportmodel.pictreportmodel.picture
我的报告文件中的控件要使用imageBytes
而不是Imagedata
。
以下是有效的语法,但没有在设计师GUI中显示图像。有什么建议吗? me.picture1.imagebytes = ctype(resources.getObject(“ picture1.imageData”),byte())
在我的prinitizecomponent()sub
sub as:
Dim resources As System.ComponentModel.ComponentResourceManager = New System.ComponentModel.ComponentResourceManager(GetType(ReportFile))
resources
'
'Picture1
'
Me.Picture1.Height = 0.94!
Me.Picture1.ImageData = CType(resources.GetObject("Picture1.ImageData"), System.IO.Stream)
Me.Picture1.Left = 0.0!
Me.Picture1.LineColor = System.Drawing.Color.FromArgb(CType(CType(255, Byte), Integer), CType(CType(255, Byte), Integer), CType(CType(255, Byte), Integer))
Me.Picture1.Name = "Picture1"
Me.Picture1.SizeMode = GrapeCity.ActiveReports.SectionReportModel.SizeModes.Stretch
Me.Picture1.Top = 0.0!
Me.Picture1.Width = 7.94!
I have the following code in ActiveReports 12 in the Designer.vb file. I'm manually upgrading to ActiveReports 16 (because choosing the upgrade option from the Visual Studio menu isn't working) and need to convert all instances of GrapeCity.ActiveReports.SectionReportModel.Picture
controls in my reporting files to use ImageBytes
instead of ImageData
.
The below is valid syntax but does not display the image in the Designer GUI. Any suggestions?
Me.Picture1.ImageBytes = CType(resources.GetObject("Picture1.ImageData"), Byte())
Resources
is defined in my InitializeComponent() Sub
as:
Dim resources As System.ComponentModel.ComponentResourceManager = New System.ComponentModel.ComponentResourceManager(GetType(ReportFile))
The Picture control is defined in the Designer.vb as follows:
'
'Picture1
'
Me.Picture1.Height = 0.94!
Me.Picture1.ImageData = CType(resources.GetObject("Picture1.ImageData"), System.IO.Stream)
Me.Picture1.Left = 0.0!
Me.Picture1.LineColor = System.Drawing.Color.FromArgb(CType(CType(255, Byte), Integer), CType(CType(255, Byte), Integer), CType(CType(255, Byte), Integer))
Me.Picture1.Name = "Picture1"
Me.Picture1.SizeMode = GrapeCity.ActiveReports.SectionReportModel.SizeModes.Stretch
Me.Picture1.Top = 0.0!
Me.Picture1.Width = 7.94!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
'me.picture.imagedata = ctype(resources.getObject(“ picture.imagedata”),system.io.b)
me.picture.imagebytes = ctype(resources.getObject(“ picture.imagedata”),byte())
'Me.Picture.ImageData = CType(resources.GetObject("Picture.ImageData"), System.IO.b)
Me.Picture.ImageBytes = CType(resources.GetObject("Picture.ImageData"), Byte())