如何设置REPORTVIEWER控件工具条显示中文? reportviewer控件属性

在WINFORM版本程序中使用微软REPORTVIEWER控件,但默认显示英文,如何将期设置为中文呢,在MSDN中有很好的说明:

第一步:写一个独立的类,实现接口IReportViewerMessages,代码如下:


Public Class ReportViewerMessagesZhcn
ImplementsIReportViewerMessages


PublicReadOnly Property BackButtonToolTip As String ImplementsMicrosoft.Reporting.WinForms.IReportViewerMessages.BackButtonToolTip
Get
Return "后退"
End Get
EndProperty

Public ReadOnly PropertyBackMenuItemText As String ImplementsMicrosoft.Reporting.WinForms.IReportViewerMessages.BackMenuItemText
Get
Return "后退"
End Get
EndProperty

Public ReadOnly PropertyChangeCredentialsText As String ImplementsMicrosoft.Reporting.WinForms.IReportViewerMessages.ChangeCredentialsText
Get
Return "更改"
End Get
EndProperty

Public ReadOnly PropertyCurrentPageTextBoxToolTip As String ImplementsMicrosoft.Reporting.WinForms.IReportViewerMessages.CurrentPageTextBoxToolTip
Get
Return "当前页"
End Get
EndProperty

Public ReadOnly PropertyDocumentMapButtonToolTip As String ImplementsMicrosoft.Reporting.WinForms.IReportViewerMessages.DocumentMapButtonToolTip
Get
Return "文档视图"
End Get
EndProperty

Public ReadOnly PropertyDocumentMapMenuItemText As String ImplementsMicrosoft.Reporting.WinForms.IReportViewerMessages.DocumentMapMenuItemText
Get
Return "文档视图"
End Get
EndProperty

Public ReadOnly PropertyExportButtonToolTip As String ImplementsMicrosoft.Reporting.WinForms.IReportViewerMessages.ExportButtonToolTip
Get
Return "导出"
End Get
EndProperty

Public ReadOnly PropertyExportMenuItemText As String ImplementsMicrosoft.Reporting.WinForms.IReportViewerMessages.ExportMenuItemText
Get
Return "选择格式:"
End Get
EndProperty

Public ReadOnly Property FalseValueTextAs String ImplementsMicrosoft.Reporting.WinForms.IReportViewerMessages.FalseValueText
Get
Return "不正确的值"
End Get
EndProperty

Public ReadOnly Property FindButtonTextAs String ImplementsMicrosoft.Reporting.WinForms.IReportViewerMessages.FindButtonText
Get
Return "查找"
End Get
EndProperty

Public ReadOnly PropertyFindButtonToolTip As String ImplementsMicrosoft.Reporting.WinForms.IReportViewerMessages.FindButtonToolTip
Get
Return "查找"
End Get
EndProperty

Public ReadOnly PropertyFindNextButtonText As String ImplementsMicrosoft.Reporting.WinForms.IReportViewerMessages.FindNextButtonText
Get
Return "下一个"
End Get
EndProperty

Public ReadOnly PropertyFindNextButtonToolTip As String ImplementsMicrosoft.Reporting.WinForms.IReportViewerMessages.FindNextButtonToolTip
Get
Return "下一个"
End Get
EndProperty

Public ReadOnly PropertyFirstPageButtonToolTip As String ImplementsMicrosoft.Reporting.WinForms.IReportViewerMessages.FirstPageButtonToolTip
Get
Return "首页"
End Get
EndProperty

Public ReadOnly PropertyLastPageButtonToolTip As String ImplementsMicrosoft.Reporting.WinForms.IReportViewerMessages.LastPageButtonToolTip
Get
Return "最后一页"
End Get
EndProperty

Public ReadOnly PropertyNextPageButtonToolTip As String ImplementsMicrosoft.Reporting.WinForms.IReportViewerMessages.NextPageButtonToolTip
Get
Return "下一页"
End Get
EndProperty

Public ReadOnly Property NoMoreMatchesAs String ImplementsMicrosoft.Reporting.WinForms.IReportViewerMessages.NoMoreMatches
Get
Return "无匹配项"
End Get
EndProperty

Public ReadOnly PropertyNullCheckBoxText As String ImplementsMicrosoft.Reporting.WinForms.IReportViewerMessages.NullCheckBoxText
Get
Return "空值"
End Get
EndProperty

Public ReadOnly PropertyNullCheckBoxToolTip As String ImplementsMicrosoft.Reporting.WinForms.IReportViewerMessages.NullCheckBoxToolTip
Get
Return "空值"
End Get
EndProperty

Public ReadOnly Property NullValueTextAs String ImplementsMicrosoft.Reporting.WinForms.IReportViewerMessages.NullValueText
Get
Return "空值"
End Get
EndProperty

Public ReadOnly Property PageOf AsString ImplementsMicrosoft.Reporting.WinForms.IReportViewerMessages.PageOf
Get
Return "页"
End Get
EndProperty

Public ReadOnly PropertyPageSetupButtonToolTip As String ImplementsMicrosoft.Reporting.WinForms.IReportViewerMessages.PageSetupButtonToolTip
Get
Return "页面设置"
End Get
EndProperty

Public ReadOnly PropertyPageSetupMenuItemText As String ImplementsMicrosoft.Reporting.WinForms.IReportViewerMessages.PageSetupMenuItemText
Get
Return "页面设置"
End Get
EndProperty

Public ReadOnly PropertyParameterAreaButtonToolTip As String ImplementsMicrosoft.Reporting.WinForms.IReportViewerMessages.ParameterAreaButtonToolTip
Get
Return "参数设置区"
End Get
EndProperty

Public ReadOnly Property PasswordPromptAs String ImplementsMicrosoft.Reporting.WinForms.IReportViewerMessages.PasswordPrompt
Get
Return "请输入密码:"
End Get
EndProperty

Public ReadOnly PropertyPreviousPageButtonToolTip As String ImplementsMicrosoft.Reporting.WinForms.IReportViewerMessages.PreviousPageButtonToolTip
Get
Return "前一页"
End Get
EndProperty

Public ReadOnly PropertyPrintButtonToolTip As String ImplementsMicrosoft.Reporting.WinForms.IReportViewerMessages.PrintButtonToolTip
Get
Return "打印"
End Get
EndProperty

Public ReadOnly PropertyPrintLayoutButtonToolTip As String ImplementsMicrosoft.Reporting.WinForms.IReportViewerMessages.PrintLayoutButtonToolTip
Get
Return "打印"
End Get
EndProperty

Public ReadOnly PropertyPrintLayoutMenuItemText As String ImplementsMicrosoft.Reporting.WinForms.IReportViewerMessages.PrintLayoutMenuItemText
Get
Return "打印"
End Get
EndProperty

Public ReadOnly PropertyPrintMenuItemText As String ImplementsMicrosoft.Reporting.WinForms.IReportViewerMessages.PrintMenuItemText
Get
Return "打印"
End Get
EndProperty

Public ReadOnly Property ProgressTextAs String ImplementsMicrosoft.Reporting.WinForms.IReportViewerMessages.ProgressText
Get
Return "正在生成报表......"
End Get
EndProperty

Public ReadOnly PropertyRefreshButtonToolTip As String ImplementsMicrosoft.Reporting.WinForms.IReportViewerMessages.RefreshButtonToolTip
Get
Return "刷新"
End Get
EndProperty

Public ReadOnly PropertyRefreshMenuItemText As String ImplementsMicrosoft.Reporting.WinForms.IReportViewerMessages.RefreshMenuItemText
Get
Return "刷新"
End Get
EndProperty

Public ReadOnly PropertySearchTextBoxToolTip As String ImplementsMicrosoft.Reporting.WinForms.IReportViewerMessages.SearchTextBoxToolTip
Get
Return "查找"
End Get
EndProperty

Public ReadOnly Property SelectAll AsString ImplementsMicrosoft.Reporting.WinForms.IReportViewerMessages.SelectAll
Get
Return "全选"
End Get
EndProperty

Public ReadOnly Property SelectAValueAs String ImplementsMicrosoft.Reporting.WinForms.IReportViewerMessages.SelectAValue
Get
Return "SelectAValue"
End Get
EndProperty

Public ReadOnly PropertyStopButtonToolTip As String ImplementsMicrosoft.Reporting.WinForms.IReportViewerMessages.StopButtonToolTip
Get
Return "停止"
End Get
EndProperty

Public ReadOnly PropertyStopMenuItemText As String ImplementsMicrosoft.Reporting.WinForms.IReportViewerMessages.StopMenuItemText
Get
Return "停止"
End Get
EndProperty

Public ReadOnly Property TextNotFoundAs String ImplementsMicrosoft.Reporting.WinForms.IReportViewerMessages.TextNotFound
Get
Return "未找到"
End Get
EndProperty

Public ReadOnly PropertyTotalPagesToolTip As String ImplementsMicrosoft.Reporting.WinForms.IReportViewerMessages.TotalPagesToolTip
Get
Return "总页数"
End Get
EndProperty

Public ReadOnly Property TrueValueTextAs String ImplementsMicrosoft.Reporting.WinForms.IReportViewerMessages.TrueValueText
Get
Return "正确值"
End Get
EndProperty

Public ReadOnly Property UserNamePromptAs String ImplementsMicrosoft.Reporting.WinForms.IReportViewerMessages.UserNamePrompt
Get
Return "用户名"
如何设置REPORTVIEWER控件工具条显示中文? reportviewer控件属性
End Get
EndProperty

Public ReadOnly PropertyViewReportButtonText As String ImplementsMicrosoft.Reporting.WinForms.IReportViewerMessages.ViewReportButtonText
Get
Return "显示报表"
End Get
EndProperty

Public ReadOnly PropertyViewReportButtonToolTip As String ImplementsMicrosoft.Reporting.WinForms.IReportViewerMessages.ViewReportButtonToolTip
Get
Return "显示报表"
End Get
EndProperty

Public ReadOnly PropertyZoomControlToolTip As String ImplementsMicrosoft.Reporting.WinForms.IReportViewerMessages.ZoomControlToolTip
Get
Return "缩放"
End Get
EndProperty

Public ReadOnly PropertyZoomMenuItemText As String ImplementsMicrosoft.Reporting.WinForms.IReportViewerMessages.ZoomMenuItemText
Get
Return "缩放"
End Get
EndProperty

Public ReadOnly PropertyZoomToPageWidth As String ImplementsMicrosoft.Reporting.WinForms.IReportViewerMessages.ZoomToPageWidth
Get
Return "页宽"
End Get
EndProperty

Public ReadOnly PropertyZoomToWholePage As String ImplementsMicrosoft.Reporting.WinForms.IReportViewerMessages.ZoomToWholePage
Get
Return "整页"
End Get
EndProperty
End Class
第二步:创建对像,设置REPORTVIEWERR控件的MESSAGEs属性

ReportViewer1.Messages = NewReportViewerMessagesZhcn

此时完成汉化,呵呵!

  

爱华网本文地址 » http://www.413yy.cn/a/25101016/325305.html

更多阅读

如何设置路由器IP地址 路由器ip地址怎么设置

如何设置路由器IP地址——简介最近有朋友问我有关如何设置路由器IP地址的问题,我把相关解答归纳出来,发布到我的百度经验里,分享给大家,仅供参考。如何设置路由器IP地址——工具/原料

如何设置穿越火线CF为全屏模式? 穿越火线win7怎么全屏

如何设置穿越火线CF为全屏模式?——简介对于如何设置穿越火线CF为全屏模式,我还是第一次遇到,我请教了别人,不过解决的方法很简单,根本不需要技术,只要会操作电脑即可,接下来我把“如何设置穿越火线CF为全屏模式”的方法教给大家,希望对大家

教你如何设置QQ透明皮肤 qq皮肤透明

近期我看到很多人问QQ透明皮肤要怎么弄,怎么设置,我在网上找了很多文章,总结了下前人的精华,尽量简单明了,让大家尽量能看懂,希望对大家有所帮助。教你如何设置QQ透明皮肤——工具/原料QQ透明皮肤补丁(rdb格式文件)教你如何设置QQ透明皮

QQ会员如何设置动态炫铃 qq会员炫铃

QQ会员如何设置动态炫铃——简介动态炫铃是可以使自己在好友那里更加酷炫的铃声提醒。对好友设置了动态炫铃后,在上线、下线、发消息时好友能在听到您的与众不同的声音的同时还能看到您不同的展示形态,是设置自己上线让好友看到的功能

xp系统如何设置开机密码 精 xp系统忘记开机密码

防止他人随意使用你的电脑,可以给你的系统加上开机密码。还可以防止他人趁你不在偷看你的文件或隐私。他的重要就相当于出门后给家门上锁一般重要!xp系统如何设置开机密码 精——工具/原料电脑xpxp系统如何设置开机密码 精——设置密

声明:《如何设置REPORTVIEWER控件工具条显示中文? reportviewer控件属性》为网友水色胭脂香满楼分享!如侵犯到您的合法权益请联系我们删除