社区
VB基础类
帖子详情
哪位大侠能用vb求出汉字的拼音码来,请告诉我,在下不胜感激。
zhangquanan
2003-11-03 10:37:48
哪位大侠能用vb求出汉字的拼音码来,请告诉我,在下不胜感激。
例如:汉字“北京”,它的拼音码为“bj”
"河北省",它的拼音码为“hbs”。
...全文
149
7
打赏
收藏
哪位大侠能用vb求出汉字的拼音码来,请告诉我,在下不胜感激。
哪位大侠能用vb求出汉字的拼音码来,请告诉我,在下不胜感激。 例如:汉字“北京”,它的拼音码为“bj” "河北省",它的拼音码为“hbs”。
复制链接
扫一扫
分享
转发到动态
举报
AI
作业
写回复
配置赞助广告
用AI写文章
7 条
回复
切换为时间正序
请发表友善的回复…
发表回复
打赏红包
rainstormmaster
2003-11-03
打赏
举报
回复
自己搜一下,这样的帖子很多:
一般就是三种方法:
1 查表法(表可以是外部码表(数据库),也可以内嵌在程序中)
2 反查微软拼音输入法
3 cuizm(射天狼) 给的例子,用起来很简单,对外部环境也没什么依赖,但可惜只能查一级汉字
高高兴兴的晶晶
2003-11-03
打赏
举报
回复
我有一个控件,感兴趣的话,留email地址或发短信,注明帖子地址
pcwak
2003-11-03
打赏
举报
回复
http://pcwak.8u8.com/py.rar
一个例子
online
2003-11-03
打赏
举报
回复
http://expert.csdn.net/Expert/topic/2407/2407438.xml?temp=.8457453
射天狼
2003-11-03
打赏
举报
回复
Option Explicit
'在窗口中加两个TEXT控件,一个输入中文,一个显示英文
Private Sub Form_Load()
Text1.Text = "我是中国人"
End Sub
Private Sub Command1_Click()
Text2.Text = GetPY(Text1.Text)
End Sub
'获得输入名称的首字拼音
Private Function GetPY(ByVal strParmeter As String) As String
Dim intTmp As String, i As Long
For i = 1 To Len(strParmeter)
intTmp = Asc(Mid(strParmeter, i, 1))
If intTmp < Asc("啊") Then
GetPY = GetPY & "*"
ElseIf intTmp >= Asc("啊") And intTmp < Asc("芭") Then
GetPY = GetPY & "A"
ElseIf intTmp >= Asc("芭") And intTmp < Asc("擦") Then
GetPY = GetPY & "B"
ElseIf intTmp >= Asc("擦") And intTmp < Asc("搭") Then
GetPY = GetPY & "C"
ElseIf intTmp >= Asc("搭") And intTmp < Asc("蛾") Then
GetPY = GetPY & "D"
ElseIf intTmp >= Asc("蛾") And intTmp < Asc("发") Then
GetPY = GetPY & "E"
ElseIf intTmp >= Asc("发") And intTmp < Asc("噶") Then
GetPY = GetPY & "F"
ElseIf intTmp >= Asc("噶") And intTmp < Asc("哈") Then
GetPY = GetPY & "G"
ElseIf intTmp >= Asc("哈") And intTmp < Asc("击") Then
GetPY = GetPY & "H"
ElseIf intTmp >= Asc("击") And intTmp < Asc("喀") Then
GetPY = GetPY & "J"
ElseIf intTmp >= Asc("喀") And intTmp < Asc("垃") Then
GetPY = GetPY & "K"
ElseIf intTmp >= Asc("垃") And intTmp < Asc("妈") Then
GetPY = GetPY & "L"
ElseIf intTmp >= Asc("妈") And intTmp < Asc("拿") Then
GetPY = GetPY & "M"
ElseIf intTmp >= Asc("拿") And intTmp < Asc("哦") Then
GetPY = GetPY & "N"
ElseIf intTmp >= Asc("哦") And intTmp < Asc("啪") Then
GetPY = GetPY & "O"
ElseIf intTmp >= Asc("啪") And intTmp < Asc("期") Then
GetPY = GetPY & "P"
ElseIf intTmp >= Asc("期") And intTmp < Asc("然") Then
GetPY = GetPY & "Q"
ElseIf intTmp >= Asc("然") And intTmp < Asc("撒") Then
GetPY = GetPY & "R"
ElseIf intTmp >= Asc("撒") And intTmp < Asc("塌") Then
GetPY = GetPY & "S"
ElseIf intTmp >= Asc("塌") And intTmp < Asc("挖") Then
GetPY = GetPY & "T"
ElseIf intTmp >= Asc("挖") And intTmp < Asc("昔") Then
GetPY = GetPY & "W"
ElseIf intTmp >= Asc("昔") And intTmp < Asc("压") Then
GetPY = GetPY & "X"
ElseIf intTmp >= Asc("压") And intTmp < Asc("匝") Then
GetPY = GetPY & "Y"
ElseIf intTmp >= Asc("匝") And intTmp < 0 Then
GetPY = GetPY & "Z"
ElseIf (intTmp >= 65 And intTmp <= 91) Or (intTmp >= 97 And intTmp <= 123) Then
GetPY = GetPY & Mid(strParmeter, i, 1)
Else
GetPY = GetPY & "*"
End If
Next
End Function
northwolves
2003-11-03
打赏
举报
回复
微软的汉字拼音还算比较全。
li_ping
2003-11-03
打赏
举报
回复
实现这个功能要引用到汉字拼音对照表,你可以制作自己的对照表但这比较麻烦;你最好引用一些现成的对照表(UCDOS、Windows都有,主持人注:比如Windows\System\winpy.mb文件,在UCDOS中有编码反查工具,可以从码表生成文本文件。),至于格式,就要你琢磨一下了。
MIMO信道容量源程序-新建 Microsoft Word 文档.doc
MIMO信道容量源程序-新建 Microsoft Word 文档.doc 那威
大侠
有MIMO信道容量源程序啊 发给小弟哈 谢了! 能帮忙给下面的图写哈程序 更好
不胜感激
! 1223.png
C#简单浏览器(再次修改了)
添加了 一个html解析的 小东西 测试了 所有的功能 实现 网页保存为 JpG 图片 也有个小的收藏夹, 因为用大浏览器不习惯就自己做了个 ,想实现地址栏图标 实在能力有限...希望那位
大侠
有的话 传个源代码给我
不胜感激
,
C#
汉字
转拼音(npinyin)将中文转换成拼音全文或首字母
汉字
转拼音貌似一直是C#开发的一个难题,无论什么方案都有一定的bug,之前使用了两种方案。1.Chinese2Spell.cs 一些不能识别的
汉字
全部转为Z2.Microsoft Visual Studio International Feature Pack 1.0 连"广&...
如何用Python将Excel表格中的
汉字
转换成拼音
最近有个项目需要将excel表格中的
汉字
转换成拼音,看到几万行的数据,一个一个手动输入貌似是不大合适(猴年马月能完成。)于是灵机一动可不可以使用python来完成这个任务呢?接下来就是查找相关的实现代码,终于...
我是一个新人
请
大侠
们多多照顾
我是一个新手,
请
大侠
们以后多多照顾,在次 小弟
不胜感激
!!
VB基础类
7,785
社区成员
197,585
社区内容
发帖
与我相关
我的任务
VB基础类
VB 基础类
复制链接
扫一扫
分享
社区描述
VB 基础类
社区管理员
加入社区
获取链接或二维码
近7日
近30日
至今
加载中
查看更多榜单
社区公告
暂无公告
试试用AI创作助手写篇文章吧
+ 用AI写文章